YoltraHooks<R extends string, S extends Record<R, any>, EM extends EventMapBase>

interface
react/src/hooks/createHooks.ts:178

The 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

NameTypeDescription
Rextends stringReducer name union.
Sextends Record<R, any>State record keyed by R.
EMextends EventMapBaseEvent map.

Properties

NameTypeDescription
shallowEqual(a: T, b: T) => booleanShallow object equality using Object.is per-key.
useAtomicPropUseAtomicProp<R, S>Subscribes to a single dotted path (or typed accessor).
useAtomicPropsUseAtomicProps<R, S>Subscribes to several paths and derives a value from the full state.
useEmit() => Emit<EM>Returns the store's typed emit.
useEventUseEvent<EM, S>Runs a handler for a specific (channel, type) event.
useSelector(selector: (state: DeepReadonly<S>) => T, isEqual?: (a: T, b: T) => boolean) => TSubscribes 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).
useSuspenseAtomicPropUseSuspenseAtomicProp<R, S>Suspense-loading variant of useAtomicProp, bound to the same context.
useSuspenseAtomicPropsUseSuspenseAtomicProps<R, S>Suspense-loading variant of useAtomicProps, bound to the same context.