YoltraHooks<R extends string, S extends Record<R, any>, EM extends EventMapBase>
interfaceThe bundle of fully-typed hooks returned by createHooks (and, with the
store and provider added, by createYoltra).
Naming this return shape explicitly — rather than letting it be inferred —
keeps createYoltra's emitted .d.ts portable: the inferred form would leak
a reference to a non-re-exported internal symbol and trip TS2742 in
composite/declaration consumers.
Type parameters
| Name | Type | Description |
|---|---|---|
R | extends string | Reducer name union. |
S | extends Record<R, any> | State record keyed by R. |
EM | extends EventMapBase | Event map. |
Properties
| Name | Type | Description |
|---|---|---|
shallowEqual | (a: T, b: T) => boolean | Shallow object equality using Object.is per-key. |
useAtomicProp | UseAtomicProp<R, S> | Subscribes to a single dotted path (or typed accessor). |
useAtomicProps | UseAtomicProps<R, S> | Subscribes to several paths and derives a value from the full state. |
useEmit | () => Emit<EM> | Returns the store's typed emit. |
useEvent | UseEvent<EM, S> | Runs a handler for a specific (channel, type) event. |
useSelector | (selector: (state: DeepReadonly<S>) => T, isEqual?: (a: T, b: T) => boolean) => T | Subscribes to a derived value with an optional equality comparator. |
useStore | () => StoreInstance<R, S, EM> | Reads the current store from context (falling back to the default store). |
useSuspenseAtomicProp | UseSuspenseAtomicProp<R, S> | Suspense-loading variant of useAtomicProp, bound to the same context. |
useSuspenseAtomicProps | UseSuspenseAtomicProps<R, S> | Suspense-loading variant of useAtomicProps, bound to the same context. |