基本信息
文件名称:React开发题库及答案.doc
文件大小:32 KB
总页数:7 页
更新时间:2025-11-25
总字数:约2.89千字
文档摘要

React开发题库及答案

单项选择题

1.React中,用于创建组件实例的方法是?

A.render()

B.mount()

C.instantiate()

D.create()

2.在React中,哪个生命周期方法会在组件挂载后立即被调用?

A.componentDidMount()

B.componentWillMount()

C.componentDidUpdate()

D.render()

3.React中的哪个钩子用于在组件中存储数据?

A.useEffect()

B.useState()

C.useContext()

D.useReducer()

4.下列哪个不是React的内置组