所有生命周期方法: constructor getDerivedStateFromProps new render componentDidMount getDerivedStateFromProps new shouldComponentUpdate render getSnapshotBeforeUpdate new componentDidUpdate componentWillUnmount getDerivedStateFromError new componentDidCatch new constructor (props) constructor一般...