Yoltra<R extends string, S extends Record<R, any>, EM extends EventMapBase>
interfaceextends YoltraHooks<R, S, EM>
The value returned by createYoltra: the created store, an optional
StoreProvider (plus its raw StoreContext), and the full set of typed hooks
from YoltraHooks.
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. |
store | StoreInstance<R, S, EM> | The store created by this call; the hooks default to it (no Provider needed). |
StoreContext | Context<StoreInstance<R, S, EM>> | Raw context carrying the store — usually you only need StoreProvider. |
StoreProvider | FC<{ children: ReactNode; store?: StoreInstance<R, S, EM> }> | Optional provider to scope a different store instance to a subtree. |
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). |