phoenix_reducer_channel v0.1.0 RC.Store behaviour View Source
Link to this section Summary
Callbacks
Dispatch an action to the store.
Retrieve a value from the store. Accepts the same query syntax as Kernel.get_in/2
.
Retrieve the entire state.
Link to this section Types
Link to this section Functions
Sets up the module to act as a store.
Link to this section Callbacks
Link to this callback
dispatch(store, action)
View Sourcedispatch(store :: Agent.agent(), action :: action()) :: {:ok, RC.DiffState.diff()} | {{:ok, term()}, RC.DiffState.diff()} | {:error, term()}
Dispatch an action to the store.
Link to this callback
get(store, keys)
View Sourceget(store :: Agent.agent(), keys :: [term(), ...]) :: term()
Retrieve a value from the store. Accepts the same query syntax as Kernel.get_in/2
.
Retrieve the entire state.