Skip to content

Releases: Yarikx/reductor

0.9.0

07 Oct 16:26
Compare
Choose a tag to compare

Major update aimed to improve and simplify initial state population.

API changes

  • Every Reducer now is responsible to populate initial state if null is received as current state in reduce method;
  • @CombinedState reducers now initialize state automatically with empty values (null for objects, false for booleans, 0 for numbers, \u0000 for char);
  • @AutoReducer annotated reducers now can specify how initial state can be created
    by introducing method with @AutoReducer.InitialState annotation (See @AutoReducer.InitialState javadoc or example);
  • Added Store.create overload without inialState argument;
  • Now before Store is created, special internal action is dispatched to populate initial state;

Other fixes

  • Simplify generated code for @CombinedState reducers;
  • Add more compile-time checks and tests;
  • Support primitives as state return and argument types for @AutoReducer.Action methods.

0.8.2

06 Oct 09:40
Compare
Choose a tag to compare
  • @CombinedState: Exlude static and default methods from processing as substates.
    Allowing to use default methods as selectors
  • Cover library and processors with tests

0.8.1

06 Oct 09:41
Compare
Choose a tag to compare
  • Added more compile time validation for @AutoReducer and @CombinedState processors
  • Processor code cleanup