-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Umbrella: 16.3 and 16.4 releases #12152
Comments
Does it make sense to have shallow rendering with the new context API? I see a couple of issues with that.
|
Yeah, it's not clear to me if this makes sense or not either. |
I am out of the loop, why is componentWillMount bad? |
Please wait for the blog post. It'll explain everything. :-) |
Is it too late to ask for |
Yeah. 😛 Please follow the RFCs to discuss early: https://github.com/reactjs/rfcs We also intentionally added |
Guys, these breaking changes are looks like a waste of thousands man/hours for big projects. What is a real benefit of these changes? I hope you know what you're doing) |
There are no breaking changes here (in React 16.3, 16.4, or another minor 16.x release). React has always respected semver, and never introduced breaking changes to public APIs in minor versions. What are you referring to? Our major releases (like upcoming 17 that is months away) always had breaking changes. That’s literally the reason for doing major releases. We have 50 thousand React components at Facebook so we don’t make any breaking changes without a good migration path that works at scale. |
@gaearon, we are waiting for a blog post that will "explain everything. :-)" and reassure us. 😌 |
@kvolkovich-sc |
@kvolkovich-sc The blog post comes out together with the release. You can see the checklist for things to do before the release right above in this thread. I don't see the sense in adding to the pressure or creating the FUD in this thread. |
Locking this so we can focus on getting the release out together with the blog post. |
We should include the Enzyme folks in the shallow context discussion, since that will almost certainly affect the public API of |
Makes sense. Want to reach out to them? |
Enzyme currently provides an API for setting legacy context when shallow rendering. Its reasonable to add a way to mock the |
16.3
getDerivedStateFromProps
UNSAFE
-prefixed versions ofcomponentWillMount
andcomponentWillUpdate
StrictMode
componentWillMount
,componentWillUpdate
,componentWillReceiveProps
.unstable_AsyncMode
unstable_batchedUpdates
in synchronous mode. Updates are flushed before React yields back to the browser.setTimeout
, promise handlers, etc.unstable_createRoot
createBatch
. Not quite ready to make this API stable.unstable_flushControlled
unstable_deferredUpdates
et al work when nested inside a lifecycle or other priority-changing function.react-reconciler
react-reconciler/persistent
, PR: Expose persistent reconciler to custom renderers #1215616.4
componentWillMount
,componentWillUpdate
, andcomponentWillReceiveProps
, even outside strict mode.UNSAFE_
prefix if you want to keep using them.create-react-class
andprop-types
.A Far Future Major Version
componentWillReceiveProps
,componentWillUpdate
,componentWillMount
Chose not to include in 16.3, but may include in 16.4 or beyond:
render
method. It would take lots of effort to migrate, mostly because of class instance methods used as event handlers. The migration effort may not be worth it if we eventually introduce a new component API that replaces classes.unstable_batchedUpdates
. We really should have made this stable a while ago, as it's clearly useful in synchronous mode. However, in asynchronous mode, it's effectively a no-op, so it would be weird to ask everyone to migrate to a new API, only to remove it in an upcoming release.unstable_AsyncMode
. It's probably ready to be used in production, in a limited capacity, but we're holding off until we've tested it more internally. Tentative plan is to make this stable in 16.4.The text was updated successfully, but these errors were encountered: