triple_pattern icon indicating copy to clipboard operation
triple_pattern copied to clipboard

[Question] Problems with initialization of stores in a situation of multiple stores, when use HydratedMixin

Open skiryuk opened this issue 3 years ago • 0 comments

I ran into a situation: let's say one service depends on a number of stores, or one store depends on another (stores with mixin HydratedMixin).

In this regard, questions (I watch HydratedMixin):

  1. Is it possible to somehow wait for a store to be initialized before initializing another one? As an option hasInitiated make RxNotifier<bool>
  2. I noticed that in the initStore method, the hasInitiated flag is set only when there is a state in the store (not equal to null). Maybe it would be more correct to take the line _flags.hasInitiated = true; out of the condition?
  3. Is it possible to disable the automatic recovery of the store and allow the developer to call the initStore method himself?
  4. Can initStore make it return Future ?

skiryuk avatar Mar 10 '22 08:03 skiryuk