-
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
Wrap createEventHandle-specific logic in a flag #21657
Conversation
Comparing: c153679...45ba73b Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
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.
It's nice to avoid unnecessary work in the commit phase.
This association feels pretty indirect though. Calling commitBeforeMutationEffectsDeletion
maybe calls beforeActiveInstanceBlur
which happens to be a no-op for most host configs except ReactDOM which happens to only do work that's gated behind enableCreateEventHandleAPI
at the moment but it seems at least possible that the host configs could change. I mean I guess in that case we'd probably catch it in our tests.
It's probably fine?
Yeah I hear you. I don't love it either.
The way I'm thinking about this is that this host config method is a compromise in the first place. It wasn't designed with intent to provide some generic functionality, but it was added for this feature in particuliar, and this feature isn't even on track to be in a stable API in its current state. So I feel like it's already a hack and we might as well not have people pay for it in open source. |
Summary: This sync includes the following changes: - **[43f4cc160](facebook/react@43f4cc160 )**: Fix failing test ([#21697](facebook/react#21697)) //<Dan Abramov>// - **[d0f348dc1](facebook/react@d0f348dc1 )**: Fix for failed Suspense layout semantics ([#21694](facebook/react#21694)) //<Brian Vaughn>// - **[bd0a96344](facebook/react@bd0a96344 )**: Throw when `act` is used in production ([#21686](facebook/react#21686)) //<Andrew Clark>// - **[9343f8720](facebook/react@9343f8720 )**: Use the server src files as entry points for the builds/tests ([#21683](facebook/react#21683)) //<Sebastian Markbåge>// - **[502f8a2a0](facebook/react@502f8a2a0 )**: [Fizz/Flight] Don't use default args ([#21681](facebook/react#21681)) //<Sebastian Markbåge>// - **[a8f5e77b9](facebook/react@a8f5e77b9 )**: Remove invokeGuardedCallback from commit phase ([#21666](facebook/react#21666)) //<Dan Abramov>// - **[dbe3363cc](facebook/react@dbe3363cc )**: [Fizz] Implement Legacy renderToString and renderToNodeStream on top of Fizz ([#21276](facebook/react#21276)) //<Sebastian Markbåge>// - **[101ea9f55](facebook/react@101ea9f55 )**: Set deletedTreeCleanUpLevel to 3 ([#21679](facebook/react#21679)) //<Dan Abramov>// - **[1a106bdc2](facebook/react@1a106bdc2 )**: Wrap eventhandle-specific logic in a flag ([#21657](facebook/react#21657)) //<Dan Abramov>// - **[cb30388d1](facebook/react@cb30388d1 )**: Export React Native `AttributeType` Types ([#21661](facebook/react#21661)) //<Timothy Yung>// - **[c1536795c](facebook/react@c1536795c )**: Revert "Make enableSuspenseLayoutEffectSemantics static for www ([#21617](facebook/react#21617))" ([#21656](facebook/react#21656)) //<Sebastian Markbåge>// Changelog: [General][Changed] - React Native sync for revisions c96b78e...568dc35 jest_e2e[run_all_tests] Reviewed By: rickhanlonii Differential Revision: D29303157 fbshipit-source-id: 90952885eb2264f4effa04070357b80700bb9be3
It seems unnecessary to have this code in commit phase in open source since the flag is off, and the actual implementations of the host methods are noops. Let's not have them?
No indent: https://github.com/facebook/react/pull/21657/files?w=1