Yarikx/reductor

About the Appstate Subscribe improments

ManBali opened this issue · 2 comments

hi,first for you reductor share. we can subscribe the datas changes we can get notifiy.
counterStore.subscribe(state -> System.out.println(state));

ok,it seems perfect,but when this happen .

there are Activity Named A,Activity Named B.

we start the A-->B

and we subscribe state in both A,B , at the same time ,A cares the datas field in state is a_name,a_sex and so on.

but B cares the datas field in state is b_name,b_sex, and so on.

when B send a dispatch action to change the b_name ,b_sex datas,

How Ever A had received the state callback the same ,i think this not very well .

in react -redux ,we use connect to diff the datas .

SO,the question is did't you had good methods to solve this problems?

Is it possible to subscribe to changes in different parts of the AppState?

You can use Cursors.map method to subscribe the data you want