Skip to content
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

Merged
merged 1 commit into from
Jun 11, 2021

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Jun 10, 2021

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

@gaearon gaearon requested a review from acdlite June 10, 2021 19:16
@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label Jun 10, 2021
@sizebot
Copy link

sizebot commented Jun 10, 2021

Comparing: c153679...45ba73b

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 127.29 kB 126.89 kB = 40.81 kB 40.69 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 130.11 kB 129.70 kB = 41.75 kB 41.61 kB
facebook-www/ReactDOM-prod.classic.js = 406.00 kB 406.00 kB = 75.07 kB 75.07 kB
facebook-www/ReactDOM-prod.modern.js = 394.35 kB 394.35 kB = 73.25 kB 73.25 kB
facebook-www/ReactDOMForked-prod.classic.js = 406.00 kB 406.00 kB = 75.07 kB 75.07 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-art/umd/react-art.development.js = 764.34 kB 762.37 kB = 161.40 kB 160.87 kB
react-native/implementations/ReactNativeRenderer-dev.fb.js = 733.33 kB 731.43 kB = 158.20 kB 157.67 kB
react-native/implementations/ReactNativeRenderer-dev.js = 720.11 kB 718.20 kB = 155.98 kB 155.44 kB
react-native/implementations/ReactFabric-dev.fb.js = 715.57 kB 713.67 kB = 153.82 kB 153.17 kB
oss-stable-semver/react-art/umd/react-art.development.js = 740.52 kB 738.55 kB = 156.66 kB 156.13 kB
oss-stable/react-art/umd/react-art.development.js = 740.52 kB 738.55 kB = 156.66 kB 156.13 kB
react-native/implementations/ReactFabric-dev.js = 702.32 kB 700.41 kB = 151.64 kB 150.99 kB
oss-experimental/react-art/cjs/react-art.development.js = 660.81 kB 658.92 kB = 143.08 kB 142.55 kB
oss-experimental/react-reconciler/cjs/react-reconciler.development.js = 720.35 kB 718.30 kB = 153.02 kB 152.50 kB
oss-experimental/react-dom/cjs/react-dom.profiling.min.js = 137.44 kB 137.04 kB = 43.94 kB 43.82 kB
oss-experimental/react-dom/umd/react-dom.profiling.min.js = 137.35 kB 136.94 kB = 44.56 kB 44.44 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.development.js = 697.70 kB 695.64 kB = 148.33 kB 147.80 kB
oss-stable/react-reconciler/cjs/react-reconciler.development.js = 697.70 kB 695.64 kB = 148.33 kB 147.80 kB
oss-stable-semver/react-art/cjs/react-art.development.js = 638.35 kB 636.46 kB = 138.34 kB 137.81 kB
oss-stable/react-art/cjs/react-art.development.js = 638.35 kB 636.46 kB = 138.34 kB 137.81 kB
facebook-www/ReactTestRenderer-dev.modern.js = 635.14 kB 633.23 kB = 136.44 kB 135.92 kB
facebook-www/ReactTestRenderer-dev.classic.js = 635.12 kB 633.22 kB = 136.43 kB 135.91 kB
oss-stable-semver/react-dom/cjs/react-dom.profiling.min.js = 132.81 kB 132.41 kB = 42.39 kB 42.27 kB
oss-stable/react-dom/cjs/react-dom.profiling.min.js = 132.81 kB 132.41 kB = 42.39 kB 42.27 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.development.js = 657.36 kB 655.39 kB = 138.85 kB 138.33 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.development.js = 626.66 kB 624.78 kB = 137.35 kB 136.81 kB
oss-stable-semver/react-dom/umd/react-dom.profiling.min.js = 132.76 kB 132.36 kB = 43.05 kB 42.92 kB
oss-stable/react-dom/umd/react-dom.profiling.min.js = 132.76 kB 132.36 kB = 43.05 kB 42.92 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-dev.js = 622.47 kB 620.56 kB = 135.04 kB 134.51 kB
oss-stable-semver/react-test-renderer/umd/react-test-renderer.development.js = 640.59 kB 638.61 kB = 135.42 kB 134.88 kB
oss-stable/react-test-renderer/umd/react-test-renderer.development.js = 640.59 kB 638.61 kB = 135.42 kB 134.88 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.development.js = 610.73 kB 608.85 kB = 133.92 kB 133.40 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.development.js = 610.73 kB 608.85 kB = 133.92 kB 133.40 kB
oss-experimental/react-dom/umd/react-dom.production.min.js = 130.07 kB 129.66 kB = 42.39 kB 42.25 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 130.11 kB 129.70 kB = 41.75 kB 41.61 kB
oss-stable-semver/react-dom/umd/react-dom.production.min.js = 127.28 kB 126.88 kB = 41.43 kB 41.34 kB
oss-stable/react-dom/umd/react-dom.production.min.js = 127.28 kB 126.88 kB = 41.43 kB 41.34 kB
oss-stable-semver/react-dom/cjs/react-dom.production.min.js = 127.29 kB 126.89 kB = 40.81 kB 40.69 kB
oss-stable/react-dom/cjs/react-dom.production.min.js = 127.29 kB 126.89 kB = 40.81 kB 40.69 kB
oss-experimental/react-art/umd/react-art.production.min.js = 118.80 kB 118.39 kB = 36.99 kB 36.83 kB
oss-stable-semver/react-art/umd/react-art.production.min.js = 116.41 kB 116.01 kB = 36.10 kB 35.99 kB
oss-stable/react-art/umd/react-art.production.min.js = 116.41 kB 116.01 kB = 36.10 kB 35.99 kB
oss-experimental/react-art/cjs/react-art.production.min.js = 82.92 kB 82.51 kB = 25.83 kB 25.68 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.production.min.js = 82.05 kB 81.65 kB = 25.56 kB 25.44 kB
react-native/implementations/ReactNativeRenderer-profiling.fb.js = 296.88 kB 295.40 kB = 52.96 kB 52.68 kB
react-native/implementations/ReactNativeRenderer-profiling.js = 296.85 kB 295.37 kB = 52.98 kB 52.70 kB
oss-stable-semver/react-art/cjs/react-art.production.min.js = 80.53 kB 80.13 kB = 25.09 kB 24.92 kB
oss-stable/react-art/cjs/react-art.production.min.js = 80.53 kB 80.13 kB = 25.09 kB 24.92 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.production.min.js = 82.21 kB 81.80 kB = 25.96 kB 25.79 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.production.min.js = 79.67 kB 79.27 kB = 24.81 kB 24.67 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.production.min.js = 79.67 kB 79.27 kB = 24.81 kB 24.67 kB
react-native/implementations/ReactFabric-profiling.fb.js = 290.45 kB 288.98 kB = 51.74 kB 51.45 kB
react-native/implementations/ReactFabric-profiling.js = 290.42 kB 288.94 kB = 51.75 kB 51.45 kB
oss-stable-semver/react-test-renderer/umd/react-test-renderer.production.min.js = 79.83 kB 79.42 kB = 25.09 kB 24.98 kB
oss-stable/react-test-renderer/umd/react-test-renderer.production.min.js = 79.83 kB 79.42 kB = 25.09 kB 24.98 kB
oss-experimental/react-reconciler/cjs/react-reconciler.profiling.min.js = 100.89 kB 100.37 kB = 31.14 kB 30.99 kB
react-native/implementations/ReactNativeRenderer-prod.fb.js = 278.86 kB 277.38 kB = 50.11 kB 49.86 kB
react-native/implementations/ReactNativeRenderer-prod.js = 278.83 kB 277.35 kB = 50.12 kB 49.87 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.profiling.min.js = 96.63 kB 96.11 kB = 29.78 kB 29.58 kB
oss-stable/react-reconciler/cjs/react-reconciler.profiling.min.js = 96.63 kB 96.11 kB = 29.78 kB 29.58 kB
react-native/implementations/ReactFabric-prod.fb.js = 272.47 kB 270.99 kB = 48.80 kB 48.56 kB
react-native/implementations/ReactFabric-prod.js = 272.42 kB 270.95 kB = 48.80 kB 48.56 kB
oss-experimental/react-reconciler/cjs/react-reconciler.production.min.js = 93.47 kB 92.95 kB = 28.88 kB 28.75 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.production.min.js = 91.02 kB 90.50 kB = 28.12 kB 27.96 kB
oss-stable/react-reconciler/cjs/react-reconciler.production.min.js = 91.02 kB 90.50 kB = 28.12 kB 27.96 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js = 253.92 kB 252.44 kB = 46.29 kB 46.05 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js = 239.22 kB 237.74 kB = 44.04 kB 43.81 kB

Generated by 🚫 dangerJS against 45ba73b

Copy link
Contributor

@bvaughn bvaughn left a 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?

@gaearon
Copy link
Collaborator Author

gaearon commented Jun 11, 2021

Yeah I hear you. I don't love it either.

it seems at least possible that the host configs could change.

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.

@gaearon gaearon merged commit 1a106bd into facebook:master Jun 11, 2021
koto pushed a commit to koto/react that referenced this pull request Jun 15, 2021
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Jun 22, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants