Use new/temporary react lifecycle methods (#1039)#1127
Merged
berickson1 merged 4 commits intomicrosoft:masterfrom Aug 22, 2019
mikehardy:unsafe-react-names
Merged
Use new/temporary react lifecycle methods (#1039)#1127berickson1 merged 4 commits intomicrosoft:masterfrom mikehardy:unsafe-react-names
berickson1 merged 4 commits intomicrosoft:masterfrom
mikehardy:unsafe-react-names
Conversation
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
Contributor
Author
|
I just pushed 3 tiny commits to the RXPTest app They all seemed necessary to run the app so I could validate these changes - @erictraut if you want I could make the RXPTest changes on a separate branch/PR as they are not really related to this change |
Collaborator
|
@berickson1 This looks good to me. Any objections? |
berickson1
approved these changes
Aug 22, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-lifecycleshttps://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