UNPKG

@blac/react

Version:

React bindings for BlaC — useBloc hook with automatic re-render optimization

29 lines (28 loc) 904 B
/** * Global configuration for `@blac/react`. * * The hook's tracking model is fixed: when `useBloc` is called without a * `select`, render-time auto-tracking is used (via * `@dirtytalk/structural`'s `trackRender`). When `select` is provided, * re-renders are driven by per-index `Object.is` over the returned array. * * Reserved for forwards-compatible knobs; currently empty. */ export interface BlacReactConfig { } /** * Configure global defaults for `@blac/react` hooks. * * @param config - Partial configuration to merge with current globals */ export declare function configureBlacReact(config: Partial<BlacReactConfig>): void; /** * Get the current global configuration. * @internal */ export declare function getBlacReactConfig(): BlacReactConfig; /** * Reset configuration to defaults (useful for testing). * @internal */ export declare function resetBlacReactConfig(): void;