单项选择题
使用es6中的class类定义组件的时候 constructor函数中必须使用以下哪个选项()
A.super()
B.this.state
C.this.props
D.this.defaultProps
点击查看答案
相关考题
-
单项选择题
在react框架中,以下那个属于react的存在期()
A.getDefaultProps
B.getInitialState
C.componentWillMount
D.shouldComponentUpdate -
单项选择题
在react框架中,componentWillUnmount生命周期的作用是()
A.接收到新的props或者state后
B.组件被移除之前被调用,可以用于做一些清理工作
C.完成渲染新的props或者state后调用
D.组件是否应当渲染新的props或state -
单项选择题
在react框架中,在react中属于实例期的生命周期都有哪些()
A.componentWillReceiveProps
B.shouldComponentUpdate
C.componentWillMount
D.componentWillUnmount
