Mocha
Nested Stores not tracking with `trackDeep`/`trackStore`
I have a top-level store created in parent component A. This store contains an array of objects, like so:
After this store is populated with objects during component A's initialization, each object is then passed as a prop to a child component B:
Now in component B, a nested store is created for easier fine-grained reactivity:
When values inside
obj
are set within component B, effects inside component B react accordingly (using trackStore
plugin, or directly depending on a specific value).
However, effects in component A do not run on updates that trigger component B's effects:
Could anyone advise on what I may be doing wrong here? Is there something wrong with passing store values as props and then creating a nested store based on that prop?2 replies