Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

AsyncMode -> ConcurrentMode #1171

Merged
merged 2 commits into from
Sep 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions backend/attachRendererFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ function getInternalReactConstants(version) {
};
}
ReactSymbols = {
ASYNC_MODE_NUMBER: 0xeacf,
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)',
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

CONTEXT_CONSUMER_NUMBER: 0xeace,
CONTEXT_CONSUMER_SYMBOL_STRING: 'Symbol(react.context)',
CONTEXT_PROVIDER_NUMBER: 0xeacd,
Expand Down Expand Up @@ -117,8 +118,9 @@ function attachRendererFiber(hook: Hook, rid: string, renderer: ReactRenderer):
ForwardRefLazy,
} = ReactTypeOfWork;
var {
ASYNC_MODE_NUMBER,
ASYNC_MODE_SYMBOL_STRING,
CONCURRENT_MODE_NUMBER,
CONCURRENT_MODE_SYMBOL_STRING,
DEPRECATED_ASYNC_MODE_SYMBOL_STRING,
CONTEXT_CONSUMER_NUMBER,
CONTEXT_CONSUMER_SYMBOL_STRING,
CONTEXT_PROVIDER_NUMBER,
Expand Down Expand Up @@ -252,10 +254,11 @@ function attachRendererFiber(hook: Hook, rid: string, renderer: ReactRenderer):
: symbolOrNumber;

switch (switchValue) {
case ASYNC_MODE_NUMBER:
case ASYNC_MODE_SYMBOL_STRING:
case CONCURRENT_MODE_NUMBER:
case CONCURRENT_MODE_SYMBOL_STRING:
case DEPRECATED_ASYNC_MODE_SYMBOL_STRING:
nodeType = 'Special';
name = 'AsyncMode';
name = 'ConcurrentMode';
children = [];
break;
case CONTEXT_PROVIDER_NUMBER:
Expand Down