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

Function mountImperativeHandle

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

Source from the content-addressed store, hash-verified

15515 }
15516
15517 function mountImperativeHandle(ref, create, deps) {
15518 {
15519 if (typeof create !== 'function') {
15520 error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
15521 }
15522 } // TODO: If deps are provided, should we skip comparing the ref itself?
15523
15524
15525 var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
15526 return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
15527 }
15528
15529 function updateImperativeHandle(ref, create, deps) {
15530 {

Callers 1

Calls 2

mountEffectImplFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected