Skip to content

Commit

Permalink
Start updating to _next_ release of react-reconciler for devtools hook
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdustan committed Nov 6, 2017
1 parent 01b7a23 commit fd1f227
Show file tree
Hide file tree
Showing 4 changed files with 386 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"dependencies": {
"invariant": "^2.2.0",
"lodash": "^3.x.x",
"react-devtools": "^2.0.12",
"react-devtools": "^2.5.2",
"react-motion": "^0.5.2",
"react-reconciler": "^0.2.0",
"ws": "^1.1.0",
Expand Down
7 changes: 2 additions & 5 deletions src/fiber/devtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ defineProperty(global, 'window', {
value: global
});

const {connectToDevTools} = require('react-devtools-core');

connectToDevTools({
const devtoolsInjection = {
isAppActive() {
// Don't steal the DevTools from currently active app.
return true;
},
host: 'localhost',
// default port? port: ,
resolveRNStyle: null, // TODO maybe: require('flattenStyle')
});

};
2 changes: 2 additions & 0 deletions src/fiber/fiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const ReactFiberReconciler : (
hostConfig: HostConfig<*, *, *, *, *, *, *, *>
) => Reconciler<*, *, *> = require('react-reconciler');

const injectIntoDevTools = require('./devtools').default;
const eventListener = require('./events');
const update = require('../shared/update').default;
const solveClass = require('../shared/solveClass').default;
Expand Down Expand Up @@ -208,6 +209,7 @@ const BlessedReconciler = ReactFiberReconciler({
},
},

injectIntoDevTools,
useSyncScheduling: true,
});

Expand Down
Loading

0 comments on commit fd1f227

Please sign in to comment.