MCPcopy
hub / github.com/BetaSu/big-react / resolveDispatcher

Function resolveDispatcher

packages/react/src/currentDispatcher.ts:21–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19};
20
21export const resolveDispatcher = (): Dispatcher => {
22 const dispatcher = currentDispatcher.current;
23
24 if (dispatcher === null) {
25 throw new Error('hook只能在函数组件中执行');
26 }
27 return dispatcher;
28};
29
30export default currentDispatcher;

Callers 8

useStateFunction · 0.90
useEffectFunction · 0.90
useTransitionFunction · 0.90
useRefFunction · 0.90
useContextFunction · 0.90
useFunction · 0.90
useMemoFunction · 0.90
useCallbackFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected