-
Notifications
You must be signed in to change notification settings - Fork 1.8k
AsyncMode -> ConcurrentMode #1171
AsyncMode -> ConcurrentMode #1171
Conversation
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.
This will break compat for all existing React releases that use AsyncMode
– we'll need to support both.
So like, add the two new constants, and update the case statements so that async+concurrent mode both follow the same path, etc.
@bvaughn I thought that was the point here? It's an unstable API so can break in any version, right? I'm happy to add support in on the devtools, but the PR to rename AsyncMode has already landed in React – did you want me to revert it? |
Well, yes– the API can change in that we can e.g. rename the export with a new release of So in this case, we'll need the 16.x DevTools adapter to handle both |
ASYNC_MODE_SYMBOL_STRING: 'Symbol(react.async_mode)', | ||
CONCURRENT_MODE_NUMBER: 0xeacf, | ||
CONCURRENT_MODE_SYMBOL_STRING: 'Symbol(react.concurrent_mode)', | ||
DEPRECATED_ASYNC_MODE_SYMBOL_STRING: 'Symbol(react.async_mode)', |
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.
This isn't sufficient. We need the number and string.
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.
The number is the same though?
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.
Haha, d'oh! Ok sorry.
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.
I think this looks right 👍 Would be nice if you could give it a quick test with the existing release of React, as well as a build from master.
It'd be cool if you reviewed my PR from 2 weeks ago that has its corresponding change already in react core and released. Thanks. |
Follow up to facebook/react#13732. Renames
AsyncMode
toConcurrentMode
.