@heridux/immer
v0.0.1
Published
Use heridux with Immer
Downloads
4
Maintainers
Readme
Table of Contents
HeriduxImmer
Extends Heridux
Creation of Heridux store
Parameters
STATE_PROPERTY
String string name for this slice of state. Generated actions wille use this as a prefix.
createAction
Create action/reducer couple
Parameters
Examples
const myStore = new Heridux("myPartialStore")
myStore.setInitialState({
list : ["foo", "bar"]
})
myStore.createAction("pop", state => { state.list.pop() })
myStore.execAction("pop")
myStore.get("list") // ["foo"]
Returns undefined
set
Set a first level value without creating a specific action
Parameters
prop
String property namevalue
any property value
Returns undefined