📜  使用 ref react 设置 className - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:14.005000             🧑  作者: Mango

代码示例1
class Test extends Component {
    constructor(props){
        //codes
    }

    hide = () => {
        const span = this.refs.spanLoading;
        span.ClassName = "hidden";
    }

    render() {

        return (
            The Quick Brown Fox.

            
        );
    }
}

export default Test;