Use new/temporary react lifecycle methods (#1039) #1127
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This migration was performed using the recommend codemod tool:
npx react-codemod rename-unsafe-lifecycles
https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#renaming-unsafe-lifecycle-methods
The change to tslint.json should be reverted after the second phase of this change
where the deprecated/UNSAFE APIs are removed completely in favor of different lifecycle APIs
The converted code will not work on react versions < v16.3 (react-native v0.55)
The converted code will continue to work on react v17.x
As discussed in #1039 the idea is to have a transitional step to provide wider backwards-compatibility, but with a contemplated breaking change that clips off compatibility to react-native < 0.60, it may be this does not have value here, and the "real" change to the new APIs is desired. That's a much larger change cognitively though, and there was an automated tool for this migration, so I propose this for consideration