react-when-ready
Version:
React tools for content readiness orchestration. Provides context providers, hooks and components to coordinate smooth transitions when async content becomes available
11 lines (10 loc) • 447 B
TypeScript
export declare const defaultValue: ReadinessContextValue;
export interface ReadinessContextValue {
/** Register new context consumer */
register: (id: string) => void;
/** Remove consumer (without readiness report) */
unregister: (id: string) => void;
/** Handler for individual consumer readiness */
markReady: (id: string) => void;
}
export declare const ReadinessContext: import("react").Context<ReadinessContextValue>;