Use pre-bundled elements inspector

Reviewed By: spicyj

Differential Revision: D2588448

fb-gh-sync-id: 278631c1de78cac2bfd9950809feddbe3f630ad0
This commit is contained in:
Alex Kotliarskyi 2015-10-29 11:15:43 -07:00 committed by facebook-github-bot-7
parent 22cc044a67
commit 9a93a3cba4
1 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@
function setupDevtools() {
var messageListeners = [];
var closeListeners = [];
var ws = new window.WebSocket('ws://localhost:8081/devtools');
var ws = new window.WebSocket('ws://localhost:8097/devtools');
// this is accessed by the eval'd backend code
var FOR_BACKEND = { // eslint-disable-line no-unused-vars
resolveRNStyle: require('flattenStyle'),
@ -31,11 +31,11 @@ function setupDevtools() {
},
};
ws.onclose = () => {
console.warn('devtools socket closed');
setTimeout(setupDevtools, 200);
closeListeners.forEach(fn => fn());
};
ws.onerror = error => {
console.warn('devtools socket errored', error);
setTimeout(setupDevtools, 200);
closeListeners.forEach(fn => fn());
};
ws.onopen = function () {
@ -58,7 +58,7 @@ function setupDevtools() {
// FOR_BACKEND is used by the eval'd code
eval(text); // eslint-disable-line no-eval
} catch (e) {
console.error('Failed to eval' + e.message);
console.error('Failed to eval: ' + e.message);
return;
}
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({