相关考题
-
单项选择题
在组件的state上定义了name=’刘于’,那么在componentDidMount (){this.setState(name:’张帅}console.log(this.state.name)}render (){console.log(this.state.name)}中两次console.log的结果是什么()
A.张帅,刘于
B.刘于,张帅
C.刘于,刘于
D.张帅,张帅 -
单项选择题
withRouter高阶组件的作用是干什么()
A.将路由相关属性扩展到当前组件的state上
B.将路由相关属性扩展到当前组件的props上
C.将路由相关方法扩展到当前组件的props上
D.将路由相关方法扩展到当前组件的state上 -
单项选择题
ref不能作用在下面那种组件上作引用 ()
A.class类组件
B.函数组件
C.业务组件
D.受控组件