Skip to content

0.10.0

Compare
Choose a tag to compare
@Yarikx Yarikx released this 03 Nov 00:33
· 50 commits to master since this release

New feature: Action creators

This feature allows defining action creators as interface separately from reducer.
This allows:

  • Separate action definition and reducer handler.
  • Get rid of direct usage of some of the generated code (action creators generated in AutoReducer reducers).
  • Per-action validation for AutoReducer reducers to have the same values as in corresponding action creator.
  • Actions can be "shared" between multiple reducers.
  • One reducer can handle actions from multiple Action creators.

To create an instance of Action creator Actions.from(class) can be used.
Example: interface,
usage.

"Old" action creators in AutoReducer is deprecated but still supported (will be removed in next version).

Other changes

  • Action class now has multiple values (Object[] values instead of Object value).
  • New Store method forEach: similar to subscribe but propagate initial value immediately.
  • New module reductor-rxjava2 to observe Store as RxJava2 Observable or Flowable.