3 ms·
As the post says, the migration will be handled gradually. All of the semi-deprecated `componentWill` lifecycles will continue to work as-is as long as you're
by acemarke 9y ago
As the post says, the migration will be handled gradually. All of the semi-deprecated `componentWill` lifecycles will continue to work as-is as long as you're on React 16.x. They'll start warning about using them in a later 16.x release. If you rename them to `UNSAFE_componentWill`, they'll continue to work the same way, and there will be a codemod released to do that transformation automatically. There will also be a `<StrictMode>` component built in to React that you can explicitly put around parts of your component tree to help locate these usages.
- brianvaughn 9y agoJust chiming in to note that the codemod has already been released: https://github.com/reactjs/react-codemod#rename-unsafe-lifecycles https://github.com/reactjs/react-codemod#rename-unsafe-lifec... We used it internally (at Facebook) several weeks ago to update ~14,000 components that used the unsafe lifecycles.