import type { AlwatrContext, SubscribeOptions } from '@alwatr/flux'; /** * React hook for subscribing to an Alwatr context and managing its state. * * * @param contextInstance - The Alwatr context instance to subscribe to * @param defaultValue - Default value to use when context is undefined * @param options - Optional subscription options * * @returns The current context state * * @example * ```tsx * // Create a context * const userContext = new AlwatrContext('user'); * * // Use the context in a component * function UserProfile() { * const defaultUser = { name: 'Guest', id: 0 }; * const user = useContext(userContext, defaultUser); * * return ( *
*

Welcome {user.name}!

*
* ); * } * * // With subscription options * function UserWithOptions() { * const user = useContext( * userContext, * defaultUser, * { once: true } // Subscription options * ); * * return
{user.name}
; * } * ``` */ export declare function useContext(contextInstance: AlwatrContext, defaultValue: T, options?: SubscribeOptions): T; //# sourceMappingURL=use-context.d.ts.map