UNPKG

rebyb-redux

Version:

rebyb-redux is a lightweight, Redux-like state management library for React applications, designed for simplicity and efficiency. Built with TypeScript, it allows developers to easily manage global state with a minimal setup. With features like customizab

14 lines (13 loc) 507 B
import { ReactNode } from "react"; interface AppContextType<S> { store: S; dispatch: <K extends keyof S>(name: K, value: S[K]) => void; multiDispatch: (actions: [keyof S, S[keyof S]][]) => void; } interface AppProviderProps<S> { initialState: S; children: ReactNode; } declare function AppProvider<S>({ initialState, children }: AppProviderProps<S>): import("react/jsx-runtime").JSX.Element; declare function useRebybRedux<S>(): AppContextType<S>; export { AppProvider, useRebybRedux };