GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Noop unstable_batchedUpdates by rickhanlonii · Pull Request #28120 · react/react Conversation
|
|
Comparing: 9f33f69...9d279d2 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
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
34d6e25 to
f792e8f
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This makes the public API a no-op but React DOM's internals also call the batchedUpdates function exposed by the reconciler.
So for maximum safety I think we should fork the implementation here. That way we don't accidentally rely on the executionContext being set:
I was thinking we would add a Fiber config like supportsLegacyMode and check that inside batchedUpdates.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
We could also add a check in React DOM to remove the extra stack frame, too, but I would still fork the lower-level function just in case. Makes it easier to delete that code later when we delete the rest of legacy mode, too. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
f792e8f to
e06ca02
Compare
|
Oh, thanks @acdlite I didn't realize we also wanted to noop the internal batched updates. I updated to use a feature flag. This means www will still use the real batchedUpdates even in createRoot, but that's how it works today and I can't figure out the right layering to prevent it. We could merge and follow up if it's a concern? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
There is a related task to move all the client apis into I could implement it using a dispatcher of sorts but I'd like to avoid it if possible however I'll need the dispatcher for flushSync so it's not like I get to completely skip that whole concept even if we do go with this strategy |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
6de030c to
b383fae
Compare
b383fae to
61c03f5
Compare
61c03f5 to
9d279d2
Compare
| }); | ||
|
|
||
| // @gate !disableLegacyMode | ||
| // @gate !disableLegacyMode && classic |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Since this no-ops in every entry point except www-classic, these tests need the extra gate.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
## Overview `unstable_batchedUpdates` is effectively a no-op outside of legacy mode, this PR makes it an actual no-op outside legacy mode.
## Overview `unstable_batchedUpdates` is effectively a no-op outside of legacy mode, this PR makes it an actual no-op outside legacy mode. DiffTrain build for commit 63651c4.
## Overview `unstable_batchedUpdates` is effectively a no-op outside of legacy mode, this PR makes it an actual no-op outside legacy mode.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.