/** * @see https://foxact.skk.moe/context-reducer * * Option 1: * * ```ts * createContextReducer(reducer, initialArg: I, init?: (arg: I) => S) * ``` */ declare function createContextReducer(reducer: (state: S, action: A) => S, initialArg: I, init?: (arg: I) => S): [ Provider: React.ComponentType, useValue: () => S, useDispatch: () => React.Dispatch, StateContext: React.Context ]; /** * @see https://foxact.skk.moe/context-reducer * * Option 2: * * ```ts * createContextReducer(reducer, initialArg?: I, init?: (arg: I) => S) * ``` * Call `initialArg`/`init` in `` is optional */ declare function createContextReducer(reducer: (state: S, action: A) => S, initialArg?: I, init?: (arg: I) => S): [ Provider: React.ComponentType S; }>>, useValue: () => S, useDispatch: () => React.Dispatch, StateContext: React.Context ]; /** * @see https://foxact.skk.moe/context-reducer * * Option 3: * * ```ts * createContextReducer(reducer) * ``` * Provide `initialArg` and/or `init` via `` */ declare function createContextReducer(reducer: (state: S, action: A) => S): [ Provider: React.ComponentType S; }>>>, useValue: () => S, useDispatch: () => React.Dispatch, StateContext: React.Context ]; export { createContextReducer };