on()create.on create(actionType).on Appropriate leaf state: boolean
Returns a Riduce-standard action to update the leaf's state to true.
action (object): a Riduce-standard action
import { createStore } from 'redux'
import riduce from 'riduce'
const initialState = {
foo: false,
bar: false
}
const [reducer, actions] = riduce(initialState)
const store = createStore(reducer)
create.onconst turnOffFoo = actions.foo.create.on
store.dispatch(turnOffFoo())
console.log(store.getState().foo) // true
create(actionType).onconst turnOffBar = actions.bar.create('TURN_ON_BAR').on
store.dispatch(turnOffBar())
console.log(store.getState().bar) // ture