MCPcopy
hub / github.com/tastejs/todomvc / injectIntoDevTools

Function injectIntoDevTools

examples/typescript-react/js/bundle.js:20352–20372  ·  view source on GitHub ↗
(devToolsConfig)

Source from the content-addressed store, hash-verified

20350}
20351
20352function injectIntoDevTools(devToolsConfig) {
20353 var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
20354
20355 return injectInternals(_assign({}, devToolsConfig, {
20356 overrideProps: overrideProps,
20357 findHostInstanceByFiber: function (fiber) {
20358 var hostFiber = findCurrentHostFiber(fiber);
20359 if (hostFiber === null) {
20360 return null;
20361 }
20362 return hostFiber.stateNode;
20363 },
20364 findFiberByHostInstance: function (instance) {
20365 if (!findFiberByHostInstance) {
20366 // Might not be implemented by the renderer.
20367 return null;
20368 }
20369 return findFiberByHostInstance(instance);
20370 }
20371 }));
20372}
20373
20374// This file intentionally does *not* have the Flow annotation.
20375// Don't add it. See `./inline-typed.js` for an explanation.

Callers 1

bundle.jsFile · 0.85

Calls 2

injectInternalsFunction · 0.85
findCurrentHostFiberFunction · 0.85

Tested by

no test coverage detected