Skip to content

Commit 123d3f3

Browse files
Brian Vaughnfacebook-github-bot
Brian Vaughn
authored andcommitted
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
1 parent 739aeda commit 123d3f3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Libraries/ReactNative/renderApplication.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ function renderApplication<Props: Object>(
4949
RootComponent.prototype.unstable_isAsyncReactComponent === true
5050
) {
5151
// $FlowFixMe This is not yet part of the official public API
52-
const AsyncMode = React.unstable_AsyncMode;
53-
renderable = <AsyncMode>{renderable}</AsyncMode>;
52+
const ConcurrentMode = React.unstable_ConcurrentMode;
53+
renderable = <ConcurrentMode>{renderable}</ConcurrentMode>;
5454
}
5555

5656
if (fabric) {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
"promise": "^7.1.1",
193193
"prop-types": "^15.5.8",
194194
"react-clone-referenced-element": "^1.0.1",
195-
"react-devtools-core": "^3.4.0",
195+
"react-devtools-core": "^3.4.2",
196196
"regenerator-runtime": "^0.11.0",
197197
"rimraf": "^2.5.4",
198198
"semver": "^5.0.3",

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -5391,10 +5391,10 @@ react-deep-force-update@^1.0.0:
53915391
resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.1.2.tgz#3d2ae45c2c9040cbb1772be52f8ea1ade6ca2ee1"
53925392
integrity sha512-WUSQJ4P/wWcusaH+zZmbECOk7H5N2pOIl0vzheeornkIMhu+qrNdGFm0bDZLCb0hSF0jf/kH1SgkNGfBdTc4wA==
53935393

5394-
react-devtools-core@^3.4.0:
5395-
version "3.4.0"
5396-
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.4.0.tgz#6b61594dce01b129a9e0b44b5bc4952f8f59ceec"
5397-
integrity sha512-yV3LLhoRwbfcQyVPNwb1EZ9W7CGu+kX2EqyZ3Cl5C+cbXcb6FJ3YSeeBt9BQB+hjyjRMBjQSKqnpPS6OMSEUow==
5394+
react-devtools-core@^3.4.2:
5395+
version "3.4.2"
5396+
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.4.2.tgz#4888b428f1db9a3078fdff66a1da14f71fb1680e"
5397+
integrity sha512-1pqbxenMeOiVPLf5Fm69woc+Q/pb/lLfWCizJuVJQDm9v7x0fcr76VMcq6Q30Onv3ikkfrlAQgOcOdCk/0t5tA==
53985398
dependencies:
53995399
shell-quote "^1.6.1"
54005400
ws "^3.3.1"

0 commit comments

Comments
 (0)