Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use new/temporary react lifecycle methods (#1039) #1127

Merged
merged 4 commits into from
Aug 22, 2019
Merged

Use new/temporary react lifecycle methods (#1039) #1127

merged 4 commits into from
Aug 22, 2019

Conversation

mikehardy
Copy link
Contributor

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

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
@mikehardy
Copy link
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

@deregtd
Copy link
Collaborator

deregtd commented Aug 21, 2019

@berickson1 This looks good to me. Any objections?

@berickson1 berickson1 self-requested a review August 22, 2019 00:40
@berickson1 berickson1 merged commit bf8a249 into microsoft:master Aug 22, 2019
@mikehardy mikehardy deleted the unsafe-react-names branch August 22, 2019 01:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants