Observes any RefSubject, including hydrated refs with typed failures. Writes
use its serialized transactions; failures also reach state when a native
binding ignores the returned Exit. Unmount/runtime replacement cancels writes.
The first subscription receives the optional initial value or undefined.
Lazy initializers only start after mount; initial can seed matching SSR and
hydration values without executing application effects during rendering.
Package version
1.0.0-beta.14
Category
function
Symbol navigation
Import
import { useRefSubject } from "@typed/svelte/Reactive";
Signatures
export declare function useRefSubject<A, E = never, R = never, ER = never>(ref: RefSubject.RefSubject<A, E, R>, options: RefSubjectOptions<A, E, R, ER> & { readonly initial: A;}): RefSubjectStore<A, E | ER, never>;
export declare function useRefSubject<A, E = never, R = never, ER = never>(ref: RefSubject.RefSubject<A, E, R>, options?: RefSubjectOptions<A, E, R, ER>): RefSubjectStore<A, E | ER>;
Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.