readAllSuccess(state, payload)
isFetching
state to false
.{ [item.id]: item }
readOneSuccess(state, payload)
isFetching
state to false
.createSuccess(state, payload)
isFetching
state to false
updateSuccess(state, payload)
isFetching
state to false
.deleteSuccess(state, payload)
isFetching
state to false
.data
failReducer(state, payload)
isFetching
state to false
.loadingReducer(state, payload)
isFetching
state to true
.notLoadingReducer(state, payload)
isFetching
state to false.setCurrent(state, payload)
state.current
to an item in state.data
state.current
to payload
resetCurrent(state, payload)
state.current
to null
crudInitialState(extendState)
crudReducers(extend, doneReducers) => CrudReducerInstance
extend
optiondoneRecuders
is set to truelifecycleReducers(name, reducers)
crudReducers
, but only for 1 method call.reducers
is an optional parameter. If the reducers are not specified, it will be provided a default. The reducers are overwritten using main
for the main action, success
for success action, fail
for fail action, and done
can be a boolean or a function.string
object
function
name
loadingReducer
function
nameSuccess
notLoadingReducer
function
nameFail
failReducer
function
| boolean
nameDone
false
or noop
noop()