Hi Ivan, just a question, does this pattern promotes a sort of circular dependencies between the stores?
I just made a simple codesandbox and when I try to see variables inside the store It shows a continuous nesting of class properties.
Like rootstore.chilstorone.rootstore.childstoreone and so on.
Isn't that make debugging uncomfortable ?
Cheers.
This pattern is safe if that is what you are asking. Yes the stores are referencing each other, but there are no memory leaks. You could also create a special class (service) that would handle out the references to other stores service.getStoreA() or service.getStore('A') and pass that class to child stores instead of the root store.
Hi Ivan, just a question, does this pattern promotes a sort of circular dependencies between the stores?
I just made a simple codesandbox and when I try to see variables inside the store It shows a continuous nesting of class properties.
Like rootstore.chilstorone.rootstore.childstoreone and so on.
Isn't that make debugging uncomfortable ?
Cheers.
This pattern is safe if that is what you are asking. Yes the stores are referencing each other, but there are no memory leaks. You could also create a special class (service) that would handle out the references to other stores
service.getStoreA()orservice.getStore('A')and pass that class to child stores instead of the root store.can you provide an example for these?