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

Function resolveDispatcher

docs/external/js/react.development.js:1546–1556  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1544 }
1545
1546 function resolveDispatcher() {
1547 var dispatcher = ReactCurrentDispatcher.current;
1548
1549 if (!(dispatcher !== null)) {
1550 {
1551 throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
1552 }
1553 }
1554
1555 return dispatcher;
1556 }
1557
1558 function useContext(Context, unstable_observedBits) {
1559 var dispatcher = resolveDispatcher();

Callers 10

useContextFunction · 0.85
useStateFunction · 0.85
useReducerFunction · 0.85
useRefFunction · 0.85
useEffectFunction · 0.85
useLayoutEffectFunction · 0.85
useCallbackFunction · 0.85
useMemoFunction · 0.85
useImperativeHandleFunction · 0.85
useDebugValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected