Releases: Yarikx/reductor
Releases · Yarikx/reductor
0.9.0
Major update aimed to improve and simplify initial state population.
API changes
- Every
Reducer
now is responsible to populate initial state ifnull
is received as current state inreduce
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 withoutinialState
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.