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 — Implement useSyncExternalStore in Fiber by acdlite · Pull Request #22239 · react/react

Conversation

@acdlite

@acdlite acdlite commented Sep 2, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Collaborator

Based on #22237

This adds an initial implementation of useSyncExternalStore to the fiber reconciler. It's mostly a copy-paste of the userspace implementation, which is not ideal but is a good enough starting place.

The main change we'll want to make to this native implementation is to move the tearing checks from the layout phase to an earlier, pre-commit phase so that code that runs in the commit phase always observes a consistent tree.

Follow-ups:

  • Implement in Fizz
  • Implement in old SSR renderer
  • Implement in react-debug-hooks: Add useSyncExternalStore to react-debug-tools #22240

Sorry, something went wrong.

Uh oh!

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

wongmjane, eps1lon, and rickhanlonii reacted with thumbs up emoji
All reactions
  • 👍 3 reactions
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Sep 2, 2021
@sizebot

sizebot commented Sep 2, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Comparing: 77912d9...15bb962

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 +0.39% 127.79 kB 128.29 kB +0.31% 40.78 kB 40.91 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.38% 130.62 kB 131.11 kB +0.33% 41.70 kB 41.84 kB
facebook-www/ReactDOM-prod.classic.js +0.47% 405.49 kB 407.38 kB +0.39% 75.10 kB 75.39 kB
facebook-www/ReactDOM-prod.modern.js +0.48% 394.05 kB 395.94 kB +0.40% 73.39 kB 73.68 kB
facebook-www/ReactDOMForked-prod.classic.js +0.47% 405.49 kB 407.38 kB +0.39% 75.11 kB 75.40 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js +0.81% 233.01 kB 234.90 kB +0.76% 42.76 kB 43.08 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-dev.js +0.79% 609.15 kB 613.99 kB +0.99% 131.57 kB 132.87 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.development.js +0.79% 598.77 kB 603.48 kB +0.99% 130.62 kB 131.91 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.development.js +0.79% 598.77 kB 603.48 kB +0.99% 130.62 kB 131.91 kB
oss-stable-semver/react-test-renderer/umd/react-test-renderer.development.js +0.78% 628.05 kB 632.96 kB +0.97% 132.01 kB 133.29 kB
oss-stable/react-test-renderer/umd/react-test-renderer.development.js +0.78% 628.05 kB 632.96 kB +0.97% 132.01 kB 133.29 kB
facebook-www/ReactTestRenderer-dev.classic.js +0.78% 620.58 kB 625.42 kB +0.99% 132.78 kB 134.09 kB
facebook-www/ReactTestRenderer-dev.modern.js +0.78% 620.59 kB 625.43 kB +0.99% 132.79 kB 134.10 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.development.js +0.77% 614.62 kB 619.33 kB +0.94% 134.00 kB 135.26 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js +0.77% 247.63 kB 249.53 kB +0.72% 45.02 kB 45.34 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.development.js +0.76% 644.74 kB 649.65 kB +0.93% 135.43 kB 136.69 kB
facebook-www/ReactART-prod.modern.js +0.75% 254.73 kB 256.63 kB +0.66% 45.59 kB 45.89 kB
oss-stable-semver/react-art/cjs/react-art.development.js +0.73% 647.83 kB 652.54 kB +0.91% 140.14 kB 141.41 kB
oss-stable/react-art/cjs/react-art.development.js +0.73% 647.83 kB 652.54 kB +0.91% 140.14 kB 141.41 kB
facebook-www/ReactART-prod.classic.js +0.72% 262.40 kB 264.29 kB +0.65% 46.83 kB 47.14 kB
oss-experimental/react-art/cjs/react-art.development.js +0.71% 663.71 kB 668.42 kB +0.86% 143.56 kB 144.80 kB
react-native/implementations/ReactFabric-prod.js +0.70% 269.32 kB 271.21 kB +0.66% 48.43 kB 48.75 kB
react-native/implementations/ReactFabric-dev.js +0.69% 699.90 kB 704.74 kB +0.84% 151.44 kB 152.72 kB
facebook-www/ReactART-dev.modern.js +0.69% 701.89 kB 706.73 kB +0.85% 149.64 kB 150.91 kB
react-native/implementations/ReactFabric-prod.fb.js +0.69% 276.62 kB 278.52 kB +0.62% 49.77 kB 50.08 kB
react-native/implementations/ReactNativeRenderer-prod.js +0.68% 277.88 kB 279.77 kB +0.64% 50.04 kB 50.36 kB
facebook-www/ReactART-dev.classic.js +0.68% 712.17 kB 717.01 kB +0.84% 151.75 kB 153.03 kB
react-native/implementations/ReactNativeRenderer-prod.fb.js +0.68% 280.49 kB 282.38 kB +0.63% 50.66 kB 50.98 kB
react-native/implementations/ReactNativeRenderer-dev.js +0.67% 717.05 kB 721.89 kB +0.85% 155.35 kB 156.67 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.development.js +0.67% 698.98 kB 703.69 kB +0.84% 148.29 kB 149.54 kB
oss-stable/react-reconciler/cjs/react-reconciler.development.js +0.67% 698.98 kB 703.69 kB +0.84% 148.29 kB 149.54 kB
react-native/implementations/ReactFabric-dev.fb.js +0.67% 721.90 kB 726.74 kB +0.81% 155.82 kB 157.08 kB
react-native/implementations/ReactFabric-profiling.js +0.66% 287.28 kB 289.18 kB +0.70% 51.29 kB 51.65 kB
oss-experimental/react-reconciler/cjs/react-reconciler.development.js +0.66% 715.05 kB 719.76 kB +0.84% 151.71 kB 152.99 kB
react-native/implementations/ReactNativeRenderer-dev.fb.js +0.66% 737.03 kB 741.87 kB +0.79% 159.20 kB 160.46 kB
oss-stable-semver/react-art/umd/react-art.development.js +0.65% 750.99 kB 755.90 kB +0.78% 158.51 kB 159.75 kB
oss-stable/react-art/umd/react-art.development.js +0.65% 750.99 kB 755.90 kB +0.78% 158.51 kB 159.75 kB
react-native/implementations/ReactFabric-profiling.fb.js +0.64% 294.61 kB 296.51 kB +0.71% 52.75 kB 53.12 kB
react-native/implementations/ReactNativeRenderer-profiling.js +0.64% 295.84 kB 297.74 kB +0.63% 52.90 kB 53.24 kB
oss-experimental/react-art/umd/react-art.development.js +0.64% 767.71 kB 772.62 kB +0.78% 161.92 kB 163.17 kB
react-native/implementations/ReactNativeRenderer-profiling.fb.js +0.63% 298.45 kB 300.34 kB +0.62% 53.53 kB 53.86 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.production.min.js +0.63% 77.79 kB 78.27 kB +0.58% 24.10 kB 24.24 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.production.min.js +0.63% 77.79 kB 78.27 kB +0.58% 24.10 kB 24.24 kB
oss-stable-semver/react-test-renderer/umd/react-test-renderer.production.min.js +0.63% 78.00 kB 78.49 kB +0.53% 24.48 kB 24.61 kB
oss-stable/react-test-renderer/umd/react-test-renderer.production.min.js +0.63% 78.00 kB 78.49 kB +0.53% 24.48 kB 24.61 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.production.min.js +0.61% 80.17 kB 80.65 kB +0.65% 24.86 kB 25.03 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.production.min.js +0.61% 80.38 kB 80.86 kB +0.51% 25.26 kB 25.39 kB
oss-stable-semver/react-art/cjs/react-art.production.min.js +0.61% 80.92 kB 81.41 kB +0.62% 25.10 kB 25.26 kB
oss-stable/react-art/cjs/react-art.production.min.js +0.61% 80.92 kB 81.41 kB +0.62% 25.10 kB 25.26 kB
oss-experimental/react-art/cjs/react-art.production.min.js +0.59% 83.31 kB 83.80 kB +0.63% 25.87 kB 26.04 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.production.min.js +0.55% 89.91 kB 90.40 kB +0.55% 27.59 kB 27.75 kB
oss-stable/react-reconciler/cjs/react-reconciler.production.min.js +0.55% 89.91 kB 90.40 kB +0.55% 27.59 kB 27.75 kB
oss-experimental/react-reconciler/cjs/react-reconciler.production.min.js +0.53% 92.36 kB 92.85 kB +0.52% 28.38 kB 28.52 kB
facebook-www/ReactDOMTesting-dev.modern.js +0.51% 940.54 kB 945.38 kB +0.61% 211.50 kB 212.80 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.profiling.min.js +0.50% 97.68 kB 98.17 kB +0.49% 29.94 kB 30.08 kB
oss-stable/react-reconciler/cjs/react-reconciler.profiling.min.js +0.50% 97.68 kB 98.17 kB +0.49% 29.94 kB 30.08 kB
facebook-www/ReactDOMTesting-dev.classic.js +0.50% 967.61 kB 972.45 kB +0.60% 217.15 kB 218.45 kB
facebook-www/ReactDOMTesting-prod.modern.js +0.50% 382.53 kB 384.43 kB +0.41% 72.64 kB 72.94 kB
oss-experimental/react-reconciler/cjs/react-reconciler.profiling.min.js +0.49% 100.15 kB 100.64 kB +0.44% 30.70 kB 30.83 kB
oss-stable-semver/react-dom/cjs/react-dom.development.js +0.49% 965.31 kB 970.02 kB +0.57% 217.07 kB 218.31 kB
oss-stable/react-dom/cjs/react-dom.development.js +0.49% 965.31 kB 970.02 kB +0.57% 217.07 kB 218.31 kB
oss-stable-semver/react-dom/umd/react-dom.development.js +0.48% 1,014.27 kB 1,019.19 kB +0.57% 219.68 kB 220.92 kB
oss-stable/react-dom/umd/react-dom.development.js +0.48% 1,014.27 kB 1,019.19 kB +0.57% 219.68 kB 220.92 kB
facebook-www/ReactDOM-prod.modern.js +0.48% 394.05 kB 395.94 kB +0.40% 73.39 kB 73.68 kB
facebook-www/ReactDOMForked-prod.modern.js +0.48% 394.05 kB 395.94 kB +0.40% 73.39 kB 73.68 kB
oss-experimental/react-dom/cjs/react-dom.development.js +0.48% 983.16 kB 987.87 kB +0.57% 220.80 kB 222.06 kB
facebook-www/ReactDOMTesting-prod.classic.js +0.48% 395.78 kB 397.68 kB +0.40% 74.70 kB 75.00 kB
oss-experimental/react-dom/umd/react-dom.development.js +0.48% 1,033.08 kB 1,037.99 kB +0.55% 223.41 kB 224.65 kB
facebook-www/ReactDOM-prod.classic.js +0.47% 405.49 kB 407.38 kB +0.39% 75.10 kB 75.39 kB
facebook-www/ReactDOMForked-prod.classic.js +0.47% 405.49 kB 407.38 kB +0.39% 75.11 kB 75.40 kB
facebook-www/ReactDOMForked-dev.modern.js +0.47% 1,038.17 kB 1,043.01 kB +0.56% 230.40 kB 231.69 kB
facebook-www/ReactDOM-dev.modern.js +0.47% 1,038.17 kB 1,043.01 kB +0.56% 230.40 kB 231.69 kB
facebook-www/ReactDOMForked-dev.classic.js +0.46% 1,062.61 kB 1,067.45 kB +0.54% 235.37 kB 236.64 kB
facebook-www/ReactDOM-dev.classic.js +0.46% 1,062.61 kB 1,067.45 kB +0.54% 235.37 kB 236.65 kB
facebook-www/ReactDOM-profiling.modern.js +0.45% 420.29 kB 422.19 kB +0.34% 77.92 kB 78.19 kB
facebook-www/ReactDOMForked-profiling.modern.js +0.45% 420.29 kB 422.19 kB +0.34% 77.93 kB 78.19 kB
facebook-www/ReactDOM-profiling.classic.js +0.44% 431.78 kB 433.68 kB +0.33% 79.62 kB 79.89 kB
facebook-www/ReactDOMForked-profiling.classic.js +0.44% 431.78 kB 433.68 kB +0.33% 79.62 kB 79.89 kB
oss-stable-semver/react-art/umd/react-art.production.min.js +0.42% 116.85 kB 117.33 kB +0.39% 36.31 kB 36.45 kB
oss-stable/react-art/umd/react-art.production.min.js +0.42% 116.85 kB 117.33 kB +0.39% 36.31 kB 36.45 kB
oss-experimental/react-art/umd/react-art.production.min.js +0.41% 119.23 kB 119.72 kB +0.40% 37.03 kB 37.18 kB
oss-stable-semver/react-dom/cjs/react-dom.production.min.js +0.39% 127.79 kB 128.29 kB +0.31% 40.78 kB 40.91 kB
oss-stable/react-dom/cjs/react-dom.production.min.js +0.39% 127.79 kB 128.29 kB +0.31% 40.78 kB 40.91 kB
oss-stable-semver/react-dom/umd/react-dom.production.min.js +0.38% 127.94 kB 128.43 kB +0.31% 41.53 kB 41.66 kB
oss-stable/react-dom/umd/react-dom.production.min.js +0.38% 127.94 kB 128.43 kB +0.31% 41.53 kB 41.66 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.38% 130.62 kB 131.11 kB +0.33% 41.70 kB 41.84 kB
oss-experimental/react-dom/umd/react-dom.production.min.js +0.38% 130.72 kB 131.21 kB +0.31% 42.49 kB 42.62 kB
oss-stable-semver/react-dom/cjs/react-dom.profiling.min.js +0.36% 135.46 kB 135.96 kB +0.36% 43.09 kB 43.24 kB
oss-stable/react-dom/cjs/react-dom.profiling.min.js +0.36% 135.46 kB 135.96 kB +0.36% 43.09 kB 43.24 kB
oss-stable-semver/react-dom/umd/react-dom.profiling.min.js +0.36% 135.57 kB 136.06 kB +0.34% 43.91 kB 44.06 kB
oss-stable/react-dom/umd/react-dom.profiling.min.js +0.36% 135.57 kB 136.06 kB +0.34% 43.91 kB 44.06 kB
oss-experimental/react-dom/cjs/react-dom.profiling.min.js +0.36% 138.31 kB 138.80 kB +0.37% 44.11 kB 44.27 kB
oss-experimental/react-dom/umd/react-dom.profiling.min.js +0.36% 138.37 kB 138.86 kB +0.35% 44.81 kB 44.97 kB

Generated by 🚫 dangerJS against 15bb962

All reactions

Sorry, something went wrong.

Uh oh!

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

@acdlite
acdlite force-pushed the usesyncexternalstore-fiber branch from 4a51283 to 4d92339 Compare September 2, 2021 21:49
@acdlite acdlite mentioned this pull request Sep 2, 2021
Add useSyncExternalStore to react-debug-tools #22240
Merged
This was referenced Sep 6, 2021
React 18: Updating state in an effect during mount causes hydration mismatch reduxjs/react-redux#1794
Closed
Initial experimental React 18 compat prototyping reduxjs/react-redux#1808
Merged
@acdlite
acdlite force-pushed the usesyncexternalstore-fiber branch 2 times, most recently from 6e8b8c0 to a95b548 Compare September 7, 2021 16:39
@acdlite acdlite mentioned this pull request Sep 7, 2021
Remove state queue from useSyncExternalStore #22265
Merged
@acdlite
acdlite force-pushed the usesyncexternalstore-fiber branch from a95b548 to c65b925 Compare September 7, 2021 16:42
rickhanlonii
rickhanlonii approved these changes Sep 7, 2021
View reviewed changes

@rickhanlonii rickhanlonii 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.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/use-sync-external-store/src/__tests__/useSyncExternalStoreShared-test.js Outdated

@rickhanlonii rickhanlonii Sep 7, 2021

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.

Just to check my understanding of the current state of act - we need to use await here because we're using internal act right? External act wouldn't?

Sorry, something went wrong.

Uh oh!

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

All reactions

@acdlite acdlite Sep 7, 2021

Copy link
Copy Markdown
Collaborator Author

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.

Yeah that's right. I think we could remove from internal act by mocking the microtask queue (which I think Jest already does, maybe?), just haven't yet. External act works because it bypasses the microtask queue entirely.

Sorry, something went wrong.

Uh oh!

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

rickhanlonii reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@acdlite
Implement useSyncExternalStore in Fiber
15bb962
This adds an initial implementation of useSyncExternalStore to the
fiber reconciler. It's mostly a copy-paste of the userspace
implementation, which is not ideal but is a good enough starting place.

The main change we'll want to make to this native implementation is to
move the tearing checks from the layout phase to an earlier, pre-commit
phase so that code that runs in the commit phase always observes a
consistent tree.

Follow-ups:

- Implement in Fizz
- Implement in old SSR renderer
- Implement in react-debug-hooks
@acdlite
acdlite force-pushed the usesyncexternalstore-fiber branch from c65b925 to 15bb962 Compare September 7, 2021 17:21
@acdlite
acdlite merged commit 06f98c1 into react:main Sep 7, 2021
facebook-github-bot pushed a commit to react/react-native that referenced this pull request Sep 11, 2021
@rickhanlonii @facebook-github-bot
React Native sync for revisions bd5bf55...95d762e
7f7f818
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
@gaearon gaearon mentioned this pull request Mar 29, 2022
Add React 18 changelog #24195
Merged
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
@acdlite @zhengjitf
Implement useSyncExternalStore in Fiber (react#22239)
f6693d7
This adds an initial implementation of useSyncExternalStore to the
fiber reconciler. It's mostly a copy-paste of the userspace
implementation, which is not ideal but is a good enough starting place.

The main change we'll want to make to this native implementation is to
move the tearing checks from the layout phase to an earlier, pre-commit
phase so that code that runs in the commit phase always observes a
consistent tree.

Follow-ups:

- Implement in Fizz
- Implement in old SSR renderer
- Implement in react-debug-hooks
This was referenced May 19, 2024
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/crystalaiteamlayer0#24
Open
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/crystalai-edgio-astro-ssr-example#1005
Open
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/crystalailayer0-astro-ssr-example#653
Open
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/crystalai-edgio-astro-ssr-example#1008
Open
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/crystalailayer0-astro-ssr-example#655
Open
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/edgio-astro-ssr-example#651
Open
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/crystalai-edgio-astro-ssr-example#1009
Open
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/edgio-astro-ssr-example#655
Open
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/crystalailayer0-astro-ssr-example#658
Open
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/layer0-astro-ssr-example#682
Open
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/crystalai-edgio-astro-ssr-example#1013
Open
[Snyk] Upgrade: react, react-dom https-quantumblockchainai-atlassian-net/edgio-astro-ssr-example#659
Open
This was referenced Nov 8, 2024
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalailayer0-astro-ssr-example#1109
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalai-edgio-astro-ssr-example#1478
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalai-edgio-astro-ssr-example#1479
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/edgio-astro-ssr-example#1128
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalailayer0-astro-ssr-example#1113
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalailayer0-astro-ssr-example#1114
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/edgio-astro-ssr-example#1129
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/edgio-astro-ssr-example#1130
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/layer0-astro-ssr-example#1116
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/layer0-astro-ssr-example#1117
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalai-edgio-astro-ssr-example#1481
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalai-edgio-astro-ssr-example#1482
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/layer0-astro-ssr-example#1121
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/layer0-astro-ssr-example#1122
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/edgio-astro-ssr-example#1134
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/edgio-astro-ssr-example#1135
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/layer0-startup#540
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/layer0-startup#541
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalailayer0-astro-ssr-example#1118
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalailayer0-astro-ssr-example#1119
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/layer0-astro-ssr-example#1126
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/layer0-astro-ssr-example#1127
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalailayer0-astro-ssr-example#1123
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalailayer0-astro-ssr-example#1124
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalai-edgio-astro-ssr-example#1486
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/crystalai-edgio-astro-ssr-example#1487
Open
[Snyk] Upgrade react from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/edgio-astro-ssr-example#1138
Open
[Snyk] Upgrade react-dom from 17.0.2 to 18.3.1 https-quantumblockchainai-atlassian-net/edgio-astro-ssr-example#1139
Open
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
@acdlite
Implement useSyncExternalStore in Fiber (react#22239)
f22cf3b
This adds an initial implementation of useSyncExternalStore to the
fiber reconciler. It's mostly a copy-paste of the userspace
implementation, which is not ideal but is a good enough starting place.

The main change we'll want to make to this native implementation is to
move the tearing checks from the layout phase to an earlier, pre-commit
phase so that code that runs in the commit phase always observes a
consistent tree.

Follow-ups:

- Implement in Fizz
- Implement in old SSR renderer
- Implement in react-debug-hooks
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@acdlite
Implement useSyncExternalStore in Fiber (react#22239)
87cd385
This adds an initial implementation of useSyncExternalStore to the
fiber reconciler. It's mostly a copy-paste of the userspace
implementation, which is not ideal but is a good enough starting place.

The main change we'll want to make to this native implementation is to
move the tearing checks from the layout phase to an earlier, pre-commit
phase so that code that runs in the commit phase always observes a
consistent tree.

Follow-ups:

- Implement in Fizz
- Implement in old SSR renderer
- Implement in react-debug-hooks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@rickhanlonii rickhanlonii rickhanlonii 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

@acdlite @sizebot @rickhanlonii @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.