MCPcopy Create free account
hub / github.com/microsoft/SandDance / updateImperativeHandle

Function updateImperativeHandle

docs/external/js/react-dom.development.js:15529–15539  ·  view source on GitHub ↗
(ref, create, deps)

Source from the content-addressed store, hash-verified

15527 }
15528
15529 function updateImperativeHandle(ref, create, deps) {
15530 {
15531 if (typeof create !== 'function') {
15532 error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
15533 }
15534 } // TODO: If deps are provided, should we skip comparing the ref itself?
15535
15536
15537 var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
15538 return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
15539 }
15540
15541 function mountDebugValue(value, formatterFn) {// This hook is normally a no-op.
15542 // The react-debug-hooks package injects its own implementation

Callers 1

Calls 2

updateEffectImplFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected