-
Notifications
You must be signed in to change notification settings - Fork 46.8k
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
RFC 6: Deprecate unsafe lifecycles #12028
Commits on Jan 16, 2018
-
Added unsafe_* lifecycles and deprecation warnings
If the old lifecycle hooks (componentWillMount, componentWillUpdate, componentWillReceiveProps) are detected, these methods will be called and a deprecation warning will be logged. (In other words, we do not check for both the presence of the old and new lifecycles.) This commit is expected to fail tests.
Configuration menu - View commit details
-
Copy full SHA for e709e30 - Browse repository at this point
Copy the full SHA e709e30View commit details -
Ran lifecycle hook codemod over project
This should handle the bulk of the updates. I will manually update TypeScript and CoffeeScript tests with another commit. The actual command run with this commit was: jscodeshift --parser=flow -t ../react-codemod/transforms/rename-unsafe-lifecycles.js ./packages/**/src/**/*.js
Configuration menu - View commit details
-
Copy full SHA for 404944e - Browse repository at this point
Copy the full SHA 404944eView commit details -
Configuration menu - View commit details
-
Copy full SHA for bd300b3 - Browse repository at this point
Copy the full SHA bd300b3View commit details -
Added inline note to createReactClassIntegration-test
Explaining why lifecycles hooks have not been renamed in this test.
Configuration menu - View commit details
-
Copy full SHA for 2868176 - Browse repository at this point
Copy the full SHA 2868176View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8679926 - Browse repository at this point
Copy the full SHA 8679926View commit details
Commits on Jan 17, 2018
-
Added static getDerivedStateFromProps to ReactPartialRenderer
Also added a new set of tests focused on server side lifecycle hooks.
Configuration menu - View commit details
-
Copy full SHA for 64f27d7 - Browse repository at this point
Copy the full SHA 64f27d7View commit details -
Added getDerivedStateFromProps to shallow renderer
Also added warnings for several cases involving getDerivedStateFromProps() as well as the deprecated lifecycles. Also added tests for the above.
Configuration menu - View commit details
-
Copy full SHA for 1047182 - Browse repository at this point
Copy the full SHA 1047182View commit details -
Configuration menu - View commit details
-
Copy full SHA for 035c220 - Browse repository at this point
Copy the full SHA 035c220View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d0e001 - Browse repository at this point
Copy the full SHA 8d0e001View commit details -
Added getDerivedStateFromProps to ReactFiberClassComponent
Also updated class component and lifecyle tests to cover the added functionality.
Configuration menu - View commit details
-
Copy full SHA for b71ca93 - Browse repository at this point
Copy the full SHA b71ca93View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09c39d0 - Browse repository at this point
Copy the full SHA 09c39d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 286df77 - Browse repository at this point
Copy the full SHA 286df77View commit details -
Configuration menu - View commit details
-
Copy full SHA for b699543 - Browse repository at this point
Copy the full SHA b699543View commit details
Commits on Jan 18, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 68f2fe7 - Browse repository at this point
Copy the full SHA 68f2fe7View commit details -
Moved lifecycle deprecation warnings behind (disabled) feature flag
Updated tests accordingly, by temporarily splitting tests that were specific to this feature-flag into their own, internal tests. This was the only way I knew of to interact with the feature flag without breaking our build/dist tests.
Configuration menu - View commit details
-
Copy full SHA for 2d9f75d - Browse repository at this point
Copy the full SHA 2d9f75dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f125b7 - Browse repository at this point
Copy the full SHA 8f125b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d3e3d5 - Browse repository at this point
Copy the full SHA 1d3e3d5View commit details -
Tweaked warning message wording slightly
Replaced 'You may may have returned undefined.' with 'You may have returned undefined.'
Configuration menu - View commit details
-
Copy full SHA for d95ec49 - Browse repository at this point
Copy the full SHA d95ec49View commit details -
Configuration menu - View commit details
-
Copy full SHA for b940938 - Browse repository at this point
Copy the full SHA b940938View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cd0a8e - Browse repository at this point
Copy the full SHA 6cd0a8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7572667 - Browse repository at this point
Copy the full SHA 7572667View commit details -
Configuration menu - View commit details
-
Copy full SHA for 361a2cf - Browse repository at this point
Copy the full SHA 361a2cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8178d52 - Browse repository at this point
Copy the full SHA 8178d52View commit details -
Inject state as a param to callGetDerivedStateFromProps
This value will be either workInProgress.memoizedState (for updates) or instance.state (for initialization).
Configuration menu - View commit details
-
Copy full SHA for 8d67e27 - Browse repository at this point
Copy the full SHA 8d67e27View commit details -
Explicitly warn about uninitialized state before calling getDerivedSt…
…ateFromProps. And added some new tests for this change. Also: * Improved a couple of falsy null/undefined checks to more explicitly check for null or undefined. * Made some small tweaks to ReactFiberClassComponent WRT when and how it reads instance.state and sets to null.
Configuration menu - View commit details
-
Copy full SHA for 53770c3 - Browse repository at this point
Copy the full SHA 53770c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3772ee2 - Browse repository at this point
Copy the full SHA 3772ee2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4dfa6e1 - Browse repository at this point
Copy the full SHA 4dfa6e1View commit details
Commits on Jan 19, 2018
-
Fix state-regression for module-pattern components
Also add support for new static getDerivedStateFromProps method
Configuration menu - View commit details
-
Copy full SHA for 5609031 - Browse repository at this point
Copy the full SHA 5609031View commit details