Adds the makeCreateReducer factory for usage in the defaultReducerFactories. Specifically handles only single entity additions (no batch creates, should make a separate reducer for these cases for clarity), sets errors to the errors property on the state slice root, and does not include a pending state by default.
This is because we recommend visualizing the redux store as a front end version of your database, as much as possible. Maintaining CREATE data structures that haven't been persisted to the data base yet violates that philosophy, and there are various strategies to handle that type of state. Some suggestions:
Can use local component state
Can create separate reducers (non-redesert generated) for specific UI state
eg, redux-form essentially creates a redux state slice specifically per instantiated form
Can create a separate namespace under each state slice specifically for non persisted data
Context
Adds the
makeCreateReducer
factory for usage in thedefaultReducerFactories
. Specifically handles only single entity additions (no batch creates, should make a separate reducer for these cases for clarity), sets errors to the errors property on the state slice root, and does not include a pending state by default.This is because we recommend visualizing the redux store as a front end version of your database, as much as possible. Maintaining CREATE data structures that haven't been persisted to the data base yet violates that philosophy, and there are various strategies to handle that type of state. Some suggestions:
redesert
generated) for specific UI stateredux-form
essentially creates a redux state slice specifically per instantiated formAdditional Changes
test-utils
from coverageTasks