-
Notifications
You must be signed in to change notification settings - Fork 782
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
Migrate from legacy to new React lifecycle #127
base: master
Are you sure you want to change the base?
Conversation
Did you test this with regards of SSR (cWM is called but cDM not)? |
I assumed tests were already covering this. Are there any use cases missing in this regard? |
isn't this should be migrate to |
Any timeframe as to when to expect this to me merged? |
@tajo @jamiebuilds any feedback on that? |
@bjminhuang I don't think so. If you do that, you'll potentially add a side effect ( |
Would really like to see this get merged. Currently trying to integrate this with a project on React 16.4 and the use of |
Actually, looks like this may have partially been addressed by this merged PR #123, although |
Any traction on this? The PR appears ready to merge. |
Any news about this PR? |
LGTM! Anything I can do to help move this along? |
@abenchi @mshwery |
@jamiebuilds can we please get this merged? Do you need a new maintainer? |
Would love to see this make some progress. |
@abenchi yes you can lazy load with latest version of react, though suspense is not supported in SSR mode... So for people like me who server side render their app, there's no option beside react universal or react loadable |
Hey @jamiebuilds @tajo |
For anyone interested, here's my solution to get rid of the warning (React 16 + 17) and still get this working (client+SSR). |
React will soon deprecate
componentWillMount
,componentWillReceiveProps
andcomponentWillUpdate
methods due to their potential misuse, especially once async rendering is launched. In fact, enabling strict mode already warns about these unsafe lifecycle methods usage.This PR moves module loading logic from
componentWillMount
tocomponentDidMount
, which is the recommended upgrade path in this case.