react重要的钩子

render :初始化渲染或者更新渲染调用

componentDidMount: 开启监听 发送ajax请求

componentWillUnMount: 做一些收尾工作 如:取消定时器

componentWillReceiveProps: 接受新的属性

猜你喜欢

转载自blog.51cto.com/13550695/2456376