生命周期
1、UNSAFE_componentWillMount: 组件渲染之前, 首次渲染组件执行(在render方法执行之前)
2、componentDidMount: 组件渲染之后, 首次渲染组件执行, 一般用于获取组件的初始化数据(在render方法执行之后)
3、UNSAFE_componentWillReceiveProps: 当组件接收props发生改变时触发, 首次渲染组件不会执行
4、shouldComponentUpdate: 拦截props、state改变, 首次渲染组件不会执行, 必须返回一个布尔类型值, true: 允许更新, false: 不允许更新
5、UNSAFE_componentWillUpdate: 组件更新之前, 首次渲染组件不会执行, (在render方法执行之前)
6、componentDidUpdate: 组件更新之后, 首次渲染组件不会执行 (在render方法执行之后)
7、componentWillUnmount: 组件被移除时触发