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

Interface Dispatcher

packages/react/src/currentDispatcher.ts:4–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import { Action, ReactContext, Usable } from 'shared/ReactTypes';
3
4export interface Dispatcher {
5 useState: <T>(initialState: (() => T) | T) => [T, Dispatch<T>];
6 useEffect: (callback: () => void | void, deps: HookDeps | undefined) => void;
7 useTransition: () => [boolean, (callback: () => void) => void];
8 useRef: <T>(initialValue: T) => { current: T };
9 useContext: <T>(context: ReactContext<T>) => T;
10 use: <T>(usable: Usable<T>) => T;
11 useMemo: <T>(nextCreate: () => T, deps: HookDeps | undefined) => T;
12 useCallback: <T>(callback: T, deps: HookDeps | undefined) => T;
13}
14
15export type Dispatch<State> = (action: Action<State>) => void;
16

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected