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 — Remove state queue from useSyncExternalStore by acdlite · Pull Request #22265 · react/react Conversation
|
|
Comparing: 06f98c1...220d6df Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Are there any tests we should write that would exercise the difference between the shim and the native implementation?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is there a test for this?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The userspace shim of useSyncExternalStore uses a useState hook because it's the only way to trigger a re-render. We don't actually use the queue to store anything, because we read the current value directly from the store. In the native implementation, we can schedule an update on the fiber directly, without the overhead of a queue.
12c2256 to
220d6df
Compare
Not yet, going to add when I implement this: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Summary: This sync includes the following changes: - **[95d762e](react/react@95d762e40 )**: Remove duplicate test //<Andrew Clark>// - **[d4d1dc0](react/react@d4d1dc085 )**: Reorder VARIANT feature flags ([#22266](react/react#22266)) //<Dan Abramov>// - **[2f156ea](react/react@2f156eafb )**: Adjust consoleManagedByDevToolsDuringStrictMode feature flag ([#22253](react/react#22253)) //<Dan Abramov>// - **[cfd8193](react/react@cfd819332 )**: Add useSyncExternalStore to react-debug-tools ([#22240](react/react#22240)) //<Andrew Clark>// - **[8e80592](react/react@8e80592a3 )**: Remove state queue from useSyncExternalStore ([#22265](react/react#22265)) //<Andrew Clark>// - **[06f98c1](react/react@06f98c168 )**: Implement useSyncExternalStore in Fiber ([#22239](react/react#22239)) //<Andrew Clark>// - **[77912d9](react/react@77912d9a0 )**: Wire up the native API for useSyncExternalStore ([#22237](react/react#22237)) //<Andrew Clark>// - **[031abd2](react/react@031abd24b )**: Add warning and test for useSyncExternalStore when getSnapshot isn't cached ([#22262](react/react#22262)) //<salazarm>// - **[b8884de](react/react@b8884de24 )**: break up import keyword to avoid being accidentally parsed as dynamic import statement in external code ([#21918](react/react#21918)) //<Jianhua Zheng>// - **[6d6bba5](react/react@6d6bba5bf )**: Fix typo in ReactUpdatePriority-test.js ([#21958](react/react#21958)) //<Ikko Ashimine>// - **[0c0d1dd](react/react@0c0d1ddae )**: feat(eslint-plugin-react-hooks): support ESLint 8.x ([#22248](react/react#22248)) //<Michaël De Boey>// - **[1314299](react/react@1314299c7 )**: Initial shim of useSyncExternalStore ([#22211](react/react#22211)) //<Andrew Clark>// - **[fc40f02](react/react@fc40f02ad )**: Add consoleManagedByDevToolsDuringStrictMode feature flag in React Reconciler ([#22196](react/react#22196)) //<Luna Ruan>// - **[46a0f05](react/react@46a0f050a )**: Set up use-sync-external-store package ([#22202](react/react#22202)) //<Andrew Clark>// - **[8723e77](react/react@8723e772b )**: Fix a string interpolation typo in ReactHooks test ([#22174](react/react#22174)) //<Matt Hargett>// - **[60a30cf](react/react@60a30cf32 )**: Console Logging for StrictMode Double Rendering ([#22030](react/react#22030)) //<Luna Ruan>// - **[76bbad3](react/react@76bbad3e3 )**: Add maxYieldMs feature flag in Scheduler ([#22165](react/react#22165)) //<Ricky>// - **[b0b53ae](react/react@b0b53ae2c )**: Add feature flags for scheduler experiments ([#22105](react/react#22105)) //<Ricky>// Changelog: [General][Changed] - React Native sync for revisions bd5bf55...95d762e jest_e2e[run_all_tests] Reviewed By: mdvacca Differential Revision: D30809906 fbshipit-source-id: 131cfdf91e15f67fa59a5d925467e538ee89fe10
The userspace shim of useSyncExternalStore uses a useState hook because it's the only way to trigger a re-render. We don't actually use the queue to store anything, because we read the current value directly from the store. In the native implementation, we can schedule an update on the fiber directly, without the overhead of a queue.
The userspace shim of useSyncExternalStore uses a useState hook because it's the only way to trigger a re-render. We don't actually use the queue to store anything, because we read the current value directly from the store. In the native implementation, we can schedule an update on the fiber directly, without the overhead of a queue.
The userspace shim of useSyncExternalStore uses a useState hook because it's the only way to trigger a re-render. We don't actually use the queue to store anything, because we read the current value directly from the store. In the native implementation, we can schedule an update on the fiber directly, without the overhead of a queue.
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.