Skip to content

Defaults API

Compare
Choose a tag to compare
@ericelliott ericelliott released this 16 Mar 04:56
· 252 commits to master since this release

Breaking changes:

  • actions: { action: { create () {} }} now defaults to pass the first argument through as the payload

Enhancements:

  • actions: { action: { reduce () {} }} now defaults to prop assign ({...state, ...payload}) if omitted (was: Error)
  • Added id = x => x utility function
  • Added assign('propName') utility function to set the provided key in the state to the payload value.
  • You can now replace the actions: { action } object with a function. It will be used as the reducer, assuming the default action creator behavior
  • More documentation and examples