nolimitstore
Version:
A lightweight Redux-like store for React and React Native, with hooks and selector support. Built with TypeScript, no boilerplate, and full reactivity via useSyncExternalStore.
9 lines (8 loc) • 370 B
TypeScript
import React from 'react';
import type { Store, Action } from './core';
export declare function StoreProvider<S>({ store, children, }: {
store: Store<S>;
children: React.ReactNode;
}): React.JSX.Element;
export declare function useDispatch<S = unknown>(): (action: Action) => void;
export declare function useStore<T, S = unknown>(selector: (state: S) => T): T;