From 50841b2f3edbae9e1c690844c5d646e20f148dcf Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Wed, 26 Sep 2018 17:53:43 +0100 Subject: [PATCH 1/2] AsyncMode -> ConcurrentMode --- backend/attachRendererFiber.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/attachRendererFiber.js b/backend/attachRendererFiber.js index a6f165cd57..91d6052e76 100644 --- a/backend/attachRendererFiber.js +++ b/backend/attachRendererFiber.js @@ -71,8 +71,8 @@ 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)', CONTEXT_CONSUMER_NUMBER: 0xeace, CONTEXT_CONSUMER_SYMBOL_STRING: 'Symbol(react.context)', CONTEXT_PROVIDER_NUMBER: 0xeacd, @@ -117,8 +117,8 @@ 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, CONTEXT_CONSUMER_NUMBER, CONTEXT_CONSUMER_SYMBOL_STRING, CONTEXT_PROVIDER_NUMBER, @@ -252,10 +252,10 @@ 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: nodeType = 'Special'; - name = 'AsyncMode'; + name = 'ConcurrentMode'; children = []; break; case CONTEXT_PROVIDER_NUMBER: From 0ddbd7836fcbefced60649226fb401cfb0ed3663 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Wed, 26 Sep 2018 18:38:05 +0100 Subject: [PATCH 2/2] add deprecated support for older symbol --- backend/attachRendererFiber.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/attachRendererFiber.js b/backend/attachRendererFiber.js index 91d6052e76..cfc8089fef 100644 --- a/backend/attachRendererFiber.js +++ b/backend/attachRendererFiber.js @@ -73,6 +73,7 @@ function getInternalReactConstants(version) { ReactSymbols = { CONCURRENT_MODE_NUMBER: 0xeacf, CONCURRENT_MODE_SYMBOL_STRING: 'Symbol(react.concurrent_mode)', + DEPRECATED_ASYNC_MODE_SYMBOL_STRING: 'Symbol(react.async_mode)', CONTEXT_CONSUMER_NUMBER: 0xeace, CONTEXT_CONSUMER_SYMBOL_STRING: 'Symbol(react.context)', CONTEXT_PROVIDER_NUMBER: 0xeacd, @@ -119,6 +120,7 @@ function attachRendererFiber(hook: Hook, rid: string, renderer: ReactRenderer): var { CONCURRENT_MODE_NUMBER, CONCURRENT_MODE_SYMBOL_STRING, + DEPRECATED_ASYNC_MODE_SYMBOL_STRING, CONTEXT_CONSUMER_NUMBER, CONTEXT_CONSUMER_SYMBOL_STRING, CONTEXT_PROVIDER_NUMBER, @@ -254,6 +256,7 @@ function attachRendererFiber(hook: Hook, rid: string, renderer: ReactRenderer): switch (switchValue) { case CONCURRENT_MODE_NUMBER: case CONCURRENT_MODE_SYMBOL_STRING: + case DEPRECATED_ASYNC_MODE_SYMBOL_STRING: nodeType = 'Special'; name = 'ConcurrentMode'; children = [];