This is a very early release of this package, do not suggest using it in production till latter stable version
I am a good old fan of spring core context DI and redux-anno is my first try to set up something similar in the Redux World.
A Simple Counter Example showing what I am trying to do
import{Model,State,Saga,createState,initReduxAnno,getContext}from'redux-anno';import{putResolve}from'redux-saga/effects';@Model()exportclassCounter{ @Statecount=createState(0asnumber); @Saga()*updateCount(nextVal:number){yieldputResolve(this.count.create(nextVal));}}describe('CounterModel',()=>{beforeAll(()=>{initReduxAnno({entryModel:Counter,});});it('counter 01',async()=>{constdefaultCtx=getContext();constcounterInst=defaultCtx.getOneInstance(Counter);expect(counterInst.count.value).toBe(0);awaitcounterInst.updateCount.dispatch(1);expect(counterInst.count.value).toBe(1);});});For more info and details, please check the sample applicationexamples/react-sample-app for now;
More detailed docs are incoming~