@2toad/reflex
Version:
A simple approach to state management
13 lines • 702 B
TypeScript
import { Reflex, ReflexOptions } from "./types";
/**
* Creates a reactive value that can be subscribed to for changes.
*
* @param options - Configuration options for the reflex value
* @param options.initialValue - The initial value to store
* @param options.equals - Optional custom equality function to determine if value has changed
* @param options.debug - Optional debug mode to log state changes
* @param options.middleware - Optional array of middleware functions to intercept state changes
* @returns A reflex object with methods to get/set values and subscribe to changes
*/
export declare function reflex<T>(options: ReflexOptions<T>): Reflex<T>;
//# sourceMappingURL=reflex.d.ts.map