Reactversion17willdeprecateseveraloftheclasscomponentAPIlifecycles:`componentWillMount`, `componentWillReceiveProps`, and `componentWillUpdate`.(Readthe[UpdateonAsyncrenderingblogpost](https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html) to learn more about why.) A couple of new lifecycles are also being added to better support [async rendering mode](https://reactjs.org/blog/2018/03/01/sneak-peek-beyond-react-16.html).
// Normally this method would only work for React 16.3 and newer,
// But the polyfill will make it work for older versions also!
}
getSnapshotBeforeUpdate(prevProps,prevState){
// Normally this method would only work for React 16.3 and newer,
// But the polyfill will make it work for older versions also!
}
// render() and other methods ...
}
// Polyfill your component so the new lifecycles will work with older versions of React:
polyfill(ExampleComponent);
exportdefaultExampleComponent;
```
##Whichlifecyclesaresupported?
Currently,thispolyfillsupports[static`getDerivedStateFromProps`](https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops) and [`getSnapshotBeforeUpdate`](https://reactjs.org/docs/react-component.html#getsnapshotbeforeupdate)- both introduced in version 16.3.
##Validation
Notethatinorderforthepolyfilltowork,noneofthefollowinglifecyclescanbedefinedbyyourcomponent:`componentWillMount`, `componentWillReceiveProps`, or `componentWillUpdate`.