mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 21:46:07 +08:00
Move out setupDevtools call from renderApplication function
Reviewed By: frantic Differential Revision: D2600393 fb-gh-sync-id: edac2fa3281314fb02a0951c342c2c1ae9b0441a
This commit is contained in:
committed by
facebook-github-bot-6
parent
63c4d07187
commit
7021918fe5
@@ -178,6 +178,13 @@ 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() {
|
||||||
|
if (__DEV__ && !window.document) {
|
||||||
|
var setupDevtools = require('setupDevtools');
|
||||||
|
setupDevtools();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setUpProcessEnv();
|
setUpProcessEnv();
|
||||||
setUpRedBoxErrorHandler();
|
setUpRedBoxErrorHandler();
|
||||||
setUpTimers();
|
setUpTimers();
|
||||||
@@ -190,6 +197,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,11 +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
|
||||||
);
|
);
|
||||||
// not when debugging in chrome
|
|
||||||
if (__DEV__ && !window.document) {
|
|
||||||
var setupDevtools = require('setupDevtools');
|
|
||||||
setupDevtools();
|
|
||||||
}
|
|
||||||
React.render(
|
React.render(
|
||||||
<AppContainer rootTag={rootTag}>
|
<AppContainer rootTag={rootTag}>
|
||||||
<RootComponent
|
<RootComponent
|
||||||
|
|||||||
Reference in New Issue
Block a user