MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / restoreStateOfTarget

Function restoreStateOfTarget

code/third-party/public/app.js:2760–2771  ·  view source on GitHub ↗
(target)

Source from the content-addressed store, hash-verified

2758var restoreQueue = null;
2759
2760function restoreStateOfTarget(target) {
2761 // We perform this translation at the end of the event loop so that we
2762 // always receive the correct fiber here
2763 var internalInstance = getInstanceFromNode(target);
2764 if (!internalInstance) {
2765 // Unmounted
2766 return;
2767 }
2768 !(fiberHostComponent && typeof fiberHostComponent.restoreControlledState === 'function') ? invariant(false, 'Fiber needs to be injected to handle a fiber target for controlled events. This error is likely caused by a bug in React. Please file an issue.') : void 0;
2769 var props = getFiberCurrentPropsFromNode(internalInstance.stateNode);
2770 fiberHostComponent.restoreControlledState(internalInstance.stateNode, internalInstance.type, props);
2771}
2772
2773var injection$2 = ReactControlledComponentInjection;
2774

Callers 1

restoreStateIfNeededFunction · 0.70

Calls 1

invariantFunction · 0.70

Tested by

no test coverage detected