component[Will/Did][Mount/Update]
will表示组件在还没有加载render时触发。
did表示加载完成后。
Mount在第一次加载时触发。
Update在之后触发。
componentWillReceiveProps 在组件接收到一个新的prop时被调用。这个方法在初始化render时不会被调用。
shouldComponentUpdate 返回一个布尔值。在组件接收到新的props或者state时被调用。在初始化时或者使用forceUpdate时不被调用。
可以在你确认不需要更新组件时使用。
componentWillUnmount在组件从 DOM 中移除的时候立刻被调用。