-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rename react lifecycle methods to prefix "UNSAFE_" #575
rename react lifecycle methods to prefix "UNSAFE_" #575
Conversation
- via `npx react-codemod rename-unsafe-lifecycles` - using options: ./src, "JavaScript with Flow" - fixes console warnings for react v16.9.0 - fixes react v17 compatibility - note that this doesn't do address the underlying motive of the warnings regarding unsafe component lifecycle methods
technically fixes #569 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, as a tmp solution before #534
Not sure why eslint change though, but as build looks good anyway - no problem with me
@nkbt awesome! i don't have merge permission though, can you merge this? yes, the eslint change was just to get the build to pass |
I've tested this PR and also check if built version works ok in one of my projects and everything seems to work well without React warnings. Merging in. |
Cannot publish until #577 |
Hi @nkbt, will you make a release with this change? |
hi @chenglou and @nkbt! what do you think of potentially shipping this quick rename? it comes from
$ npx react-codemod rename-unsafe-lifecycles
and would make the developer experience a little better for consumers that are on react v16.9, like we are at @Frameiofor anyone just catching up with this situation — please note that this rename fixes the console warnings introduced in [email protected] such that code will run in react@17, but this rename doesn't address the underlying issue
edit: i pushed a config change just to get the build to pass, so please lmk if there's a different way that would work better here