react-shared-states
Version:
Global state made as simple as useState, with zero config, built-in async caching, and automatic scoping.
13 lines (12 loc) • 558 B
TypeScript
import { PropsWithChildren } from 'react';
import { Prefix } from '../types';
export interface SharedStatesType {
scopeName: string;
}
export declare const SharedStatesContext: import('react').Context<SharedStatesType | undefined>;
interface SharedStatesProviderProps extends PropsWithChildren {
scopeName?: Prefix;
}
export declare const SharedStatesProvider: ({ children, scopeName }: SharedStatesProviderProps) => import("react/jsx-runtime").JSX.Element;
export declare const useSharedStatesContext: () => SharedStatesType | undefined;
export {};