@gtgalone/react-store
Version:
React Hook Store with useContext and useReducer
17 lines (16 loc) • 475 B
TypeScript
import * as React from 'react';
export declare const actions: {
SET_STATE: string;
};
export declare const StoreContext: React.Context<any>;
export interface StoreProviderProps<T> {
initialState: T;
reducer?: T;
children: React.ReactNode | React.ReactNode[] | null;
}
export declare const StoreProvider: React.FC<StoreProviderProps<any>>;
export declare const useStore: () => {
state: any;
dispatch: any;
dispatchState: (payload: any) => void;
};