GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Wrap createEventHandle-specific logic in a flag by gaearon · Pull Request #21657 · react/react

Conversation

@gaearon

@gaearon gaearon commented Jun 10, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gaearon
Wrap eventhandle-specific logic in a flag
45ba73b
@facebook-github-bot facebook-github-bot added the CLA Signed label Jun 10, 2021
@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

sizebot commented Jun 10, 2021

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gaearon
gaearon requested a review from bvaughn June 10, 2021 19:24
@gaearon gaearon mentioned this pull request Jun 10, 2021
Move guarded callback closer to usage #21658
Closed
bvaughn
bvaughn approved these changes Jun 11, 2021
View reviewed changes

@bvaughn bvaughn left a comment

Copy link
Copy Markdown
Contributor

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gaearon

gaearon commented Jun 11, 2021

Copy link
Copy Markdown
Collaborator Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gaearon
gaearon merged commit 1a106bd into react:master Jun 11, 2021
koto pushed a commit to koto/react that referenced this pull request Jun 15, 2021
@gaearon @koto
Wrap eventhandle-specific logic in a flag (react#21657)
3e4d3a6
facebook-github-bot pushed a commit to react/react-native that referenced this pull request Jun 22, 2021
@kacieb @facebook-github-bot
React Native sync for revisions c96b78e...568dc35
d4d22fb
Summary:
This sync includes the following changes:
- **[43f4cc1](react/react@43f4cc160 )**: Fix failing test ([#21697](react/react#21697)) //<Dan Abramov>//
- **[d0f348d](react/react@d0f348dc1 )**: Fix for failed Suspense layout semantics ([#21694](react/react#21694)) //<Brian Vaughn>//
- **[bd0a963](react/react@bd0a96344 )**: Throw when `act` is used in production ([#21686](react/react#21686)) //<Andrew Clark>//
- **[9343f87](react/react@9343f8720 )**: Use the server src files as entry points for the builds/tests ([#21683](react/react#21683)) //<Sebastian Markbåge>//
- **[502f8a2](react/react@502f8a2a0 )**: [Fizz/Flight] Don't use default args ([#21681](react/react#21681)) //<Sebastian Markbåge>//
- **[a8f5e77](react/react@a8f5e77b9 )**: Remove invokeGuardedCallback from commit phase ([#21666](react/react#21666)) //<Dan Abramov>//
- **[dbe3363](react/react@dbe3363cc )**: [Fizz] Implement Legacy renderToString and renderToNodeStream on top of Fizz ([#21276](react/react#21276)) //<Sebastian Markbåge>//
- **[101ea9f](react/react@101ea9f55 )**: Set deletedTreeCleanUpLevel to 3 ([#21679](react/react#21679)) //<Dan Abramov>//
- **[1a106bd](react/react@1a106bdc2 )**: Wrap eventhandle-specific logic in a flag ([#21657](react/react#21657)) //<Dan Abramov>//
- **[cb30388](react/react@cb30388d1 )**: Export React Native `AttributeType` Types ([#21661](react/react#21661)) //<Timothy Yung>//
- **[c153679](react/react@c1536795c )**: Revert "Make enableSuspenseLayoutEffectSemantics static for www ([#21617](react/react#21617))" ([#21656](react/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
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
@gaearon
Wrap eventhandle-specific logic in a flag (react#21657)
515cdd1
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@gaearon
Wrap eventhandle-specific logic in a flag (react#21657)
0f59650
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@acdlite acdlite Awaiting requested review from acdlite
1 more reviewer
@bvaughn bvaughn bvaughn approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@gaearon @sizebot @bvaughn @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.