mirror of
https://github.com/status-im/react-native.git
synced 2025-02-06 06:34:01 +00:00
Fixed: Move out setupDevtools call from renderApplication function
Reviewed By: sahrens Differential Revision: D2620876 fb-gh-sync-id: 8971a1c523c06966dd11280e19272429aa3f9c8d
This commit is contained in:
parent
f5670f8ab5
commit
4e1f2f4e0f
@ -178,6 +178,14 @@ function setUpNumber() {
|
|||||||
Number.MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -(Math.pow(2, 53) - 1);
|
Number.MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -(Math.pow(2, 53) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setUpDevTools() {
|
||||||
|
// not when debugging in chrome
|
||||||
|
if (__DEV__ && !window.document && require('Platform').OS === 'ios') {
|
||||||
|
var setupDevtools = require('setupDevtools');
|
||||||
|
setupDevtools();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setUpProcessEnv();
|
setUpProcessEnv();
|
||||||
setUpRedBoxErrorHandler();
|
setUpRedBoxErrorHandler();
|
||||||
setUpTimers();
|
setUpTimers();
|
||||||
@ -190,6 +198,7 @@ setUpWebSockets();
|
|||||||
setUpProfile();
|
setUpProfile();
|
||||||
setUpFlowChecker();
|
setUpFlowChecker();
|
||||||
setUpNumber();
|
setUpNumber();
|
||||||
|
setUpDevTools();
|
||||||
|
|
||||||
// Just to make sure the JS gets packaged up. Wait until the JS environment has
|
// Just to make sure the JS gets packaged up. Wait until the JS environment has
|
||||||
// been initialized before requiring them.
|
// been initialized before requiring them.
|
||||||
|
@ -69,10 +69,6 @@ function renderApplication<D, P, S>(
|
|||||||
rootTag,
|
rootTag,
|
||||||
'Expect to have a valid rootTag, instead got ', rootTag
|
'Expect to have a valid rootTag, instead got ', rootTag
|
||||||
);
|
);
|
||||||
if (__DEV__ && !window.document) {
|
|
||||||
var setupDevtools = require('setupDevtools');
|
|
||||||
setupDevtools();
|
|
||||||
}
|
|
||||||
React.render(
|
React.render(
|
||||||
<AppContainer rootTag={rootTag}>
|
<AppContainer rootTag={rootTag}>
|
||||||
<RootComponent
|
<RootComponent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user