-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
concurrent mode vs concurrent feature #6518
Comments
From the user’s perspective, there are no modes. You should ignore React’s source code — it can always lag behind public naming. We don’t expect anyone to read the source code, so if you choose to do it, then the confusion is kind of on you. :) The story goes like this:
That’s basically the story. Yes, in practice some features are half-supported before 18 (like Suspense). But we don’t consider it valid to run |
@gaearon it will still be great if React can help provide a list of expected difference, as we do see mysterious bugs when switching from What might happen in an org is: the infra team will upgrade to lib to 18, but keep everything in the legacy root, and ask each feature team to adopt the ....
so far I still feel the best way to "explain hook" is to look into the source code/data structure to think of them as linked-list nodes :0 |
@hkjpotato we've provided a guide here. |
@rickhanlonii thanks! |
in react new doc site, we only mention "concurrent feature" now https://react.dev/blog/2021/12/17/react-conf-2021-recap#react-18-and-concurrent-features
yet, in react's code, "ConcurrentMode" is still used (e.g. https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberBeginWork.js#L2524), this becomes more confusing after diving into the code and realize historically we also have "Blocking" mode facebook/react#20974 ...and more
q1: does React has some kind of "terms" wiki to explain what all these modes were/are?
q2: iiuc, after updating to React18, with
ReactDOM.render
it is still a legacy mode root (evenSuspense
cannot trigger concurrent rendering). OnlycreateRoot
will create a current root (so as to use concurrent feature).However, I only find some fragmented info online about the difference: e.g.
Can we provide a list of difference on
ReactDOM.render
vscreateRoot.render
in react18?this could help dev to understand / explain the changes (often behind feature flag) in org.
The text was updated successfully, but these errors were encountered: