Comments (2)
A useSyncExternalStore
update can't be a transition — that's why it's a "sync" external store. Only React-managed state like useState
or useReducer
can be updated in a transition. That's the tradeoff of useSyncExternalStore
, and why it's only recommended to use if you can't let React drive the state updates.
from react.
Hi @gaearon!
First and foremost: thanks a lot for such a quick replay!
Yeah, I suppose that makes sense. I actually suspected that could have been the case. However, I did check in the docs and there was no mention of this on the "caveats" section of the startTransition
docs, nor anywhere else on the docs of usSyncExternalStore
. So yeah, that combined with the fact that the error is a bit misleading, made me think that perhaps this was a bug.
Please understand that I'm not complaining, I'm just sharing this feedback so that these things can be improved. Although, I'm sure that you must have bigger fish to fry. Anyways, I will try to find some time during this week to open a PR to -at least- try to improve the docs.
Thanks again!
from react.
Related Issues (20)
- [DevTools Bug] Cannot remove node "197" because no matching node was found in the Store. HOT 1
- React dev tools not working when running the application/website on incognito mode HOT 4
- Bug: React Context weird re-rendering behavior HOT 2
- Bug: Throws an error on particular sites: `TypeError: Cannot use 'in' operator to search for 'animation' in undefined` HOT 4
- Bug: Auto-inserted `rel=preload` script resources are blocked by nonce-CSP HOT 5
- React Component not rendering HOT 10
- Bug: I dunno whether its a bug or a default feature of React, under Sources tab of chrome dev tools, complete source code of my frontend project is getting exposed whether I run it locally or in production. I researched on this and tried many methods but it's still visible. HOT 4
- [DevTools Bug] Cannot add node "1751" because a node with that id is already in the Store. HOT 10
- [DevTools Bug] Cannot remove node "226752" because no matching node was found in the Store. HOT 11
- [DevTools Bug]: Regression - profiling doesn't store props value HOT 1
- [DevTools Bug]: Using different React instances across multiple frames throws errors HOT 4
- Bug:
- Props passed to components in an array are never updated HOT 6
- Bug: Don't crash the app if an async component is accidentally used on the client HOT 1
- Bug:
- Bug: Unable to type new character when textarea is focused, happen when using Japanese IME on IOS HOT 4
- Built-in Form Handling HOT 2
- Bug: Auto generated preload links should respect fetchpriority if specified HOT 5
- Jazz®
- Bug: useTransition and uSES do not work together, uT is not resilient to amount-of-render HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.