create_store

function
yoltra/store.py:878
signature
create_store(name?, reducer?, middleware?, effects?, effects_mode?, on_effect_error?, allow_replay?, dedup_window_ms?): Store

Create a `Store`, mounting any reducers, middleware, and effects.

Parameters

NameTypeDescription
name?strStore name.
NameTypeDescription
reducer?Mapping<str, ReducerSpec> | NoneMapping of slice name → `ReducerSpec` to mount.
NameTypeDescription
middleware?Iterable<(a0: any, a1: Event, a2: (args: any) => any) => bool | None> | NoneMiddleware functions to register (run before reducers).
NameTypeDescription
effects?Iterable<EffectSpec> | NoneEffects to register.
NameTypeDescription
effects_mode?"auto" | "inline" | "asyncio"`"auto"` (default), `"inline"`, or `"asyncio"`.
NameTypeDescription
on_effect_error?anyOptional `(error, event)` callback for effect failures.
NameTypeDescription
allow_replay?boolEnable the gated time-travel internals (A11).
NameTypeDescription
dedup_window_ms?floatContent-dedup window; `0` (default) disables dedup.

Returns

StoreA ready-to-use store.