From aacb06c594dcd4581918035f713a69cf73bf125b Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Thu, 15 Nov 2018 09:23:56 -0800 Subject: [PATCH] Fix React Native AsyncMode and DevTools Summary: Fixes two problems I uncovered with React Native: 1. `FBCore/Prelude` points to `React.unstable_AsyncMode` which is not defined. (This type was renamed to `React.unstable_ConcurrentMode` in React v16.6.0. **As a result** people in the "react_native:async_rendering" GK will no longer get runtime errors on app start. 2. Updates `react-devtools` and (more importantly) `react-devtools-core` to 3.4.2 to handle the React-internal tag/type refactoring that happened prior to the release of 16.6.0. **As a result** DevTools will no longer cause a runtime error when connected to React Native. For the second change, I ran `js1 upgrade react-devtools -v ^3.4.2` Reviewed By: sebmarkbage Differential Revision: D13030590 fbshipit-source-id: 603f7f6259f282839039820bcdba4310064a7965 --- Libraries/ReactNative/renderApplication.js | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Libraries/ReactNative/renderApplication.js b/Libraries/ReactNative/renderApplication.js index 7be946ec8b..33749fca17 100644 --- a/Libraries/ReactNative/renderApplication.js +++ b/Libraries/ReactNative/renderApplication.js @@ -49,8 +49,8 @@ function renderApplication( RootComponent.prototype.unstable_isAsyncReactComponent === true ) { // $FlowFixMe This is not yet part of the official public API - const AsyncMode = React.unstable_AsyncMode; - renderable = {renderable}; + const ConcurrentMode = React.unstable_ConcurrentMode; + renderable = {renderable}; } if (fabric) { diff --git a/package.json b/package.json index 934e2bc30a..dfe76b51e6 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "promise": "^7.1.1", "prop-types": "^15.5.8", "react-clone-referenced-element": "^1.0.1", - "react-devtools-core": "^3.4.0", + "react-devtools-core": "^3.4.2", "regenerator-runtime": "^0.11.0", "rimraf": "^2.5.4", "semver": "^5.0.3", diff --git a/yarn.lock b/yarn.lock index 42ee42ecbc..aa973dbafe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5391,10 +5391,10 @@ react-deep-force-update@^1.0.0: resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.1.2.tgz#3d2ae45c2c9040cbb1772be52f8ea1ade6ca2ee1" integrity sha512-WUSQJ4P/wWcusaH+zZmbECOk7H5N2pOIl0vzheeornkIMhu+qrNdGFm0bDZLCb0hSF0jf/kH1SgkNGfBdTc4wA== -react-devtools-core@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.4.0.tgz#6b61594dce01b129a9e0b44b5bc4952f8f59ceec" - integrity sha512-yV3LLhoRwbfcQyVPNwb1EZ9W7CGu+kX2EqyZ3Cl5C+cbXcb6FJ3YSeeBt9BQB+hjyjRMBjQSKqnpPS6OMSEUow== +react-devtools-core@^3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.4.2.tgz#4888b428f1db9a3078fdff66a1da14f71fb1680e" + integrity sha512-1pqbxenMeOiVPLf5Fm69woc+Q/pb/lLfWCizJuVJQDm9v7x0fcr76VMcq6Q30Onv3ikkfrlAQgOcOdCk/0t5tA== dependencies: shell-quote "^1.6.1" ws "^3.3.1"