在服务端渲染时 componentDidMount 是不会被调用的,只会调用componentWillMount.
2.在componentWillMount中, 我们一般会用来异步获取数据, 但是在新版生命周期中...在目前16.3之前的react版本中 ,react是同步渲染的, 在componentWillMount中接口调用,有可能不会触发界面渲染,而在componentDidMount中渲染一定会触发界面渲染...,具体可以看这个issue
在16.3之后react开始异步渲染,在异步渲染模式下,使用componentWillMount会被多次调用,并且存在内存泄漏等问题
关于在componentWillMount...比componentDidMount请求早,具体应该是componentWillMount会立即执行,执行完之后会立即进行render
在componentDidMount 被调用后,componentWillUnmount...相信在 React 正式开启异步渲染模式之后, 许多常用组件的性能将很有可能迎来一次整体的提升。