mapStores and nested components #1136
Unanswered
plweil
asked this question in
Help and Questions
Replies: 1 comment
-
I have the same question. I was hoping to use the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using
mapStores()
in my root-level component, but I'm finding that I need to map one or more of these stores again in some of my nested components. I thoughtmapStores()
would work for all nested components. What determines whenmapStores()
will no longer apply to a nested component? So far I've been using trial-and-error, but it would be helpful to know when I need to map relevant stores a second time, or what I can do to have an initialmapStores()
work in all of my nested components (we're talking about maybe 5 nested components, not dozens).Related question: can someone please verify whether using
mapStores()
should mitigate the need to usemapWritableState()
, or do I need to apply the latter explicitly whenever I need to write to state properties? My initial experience suggests that I need to usemapWritableState()
regardless.Beta Was this translation helpful? Give feedback.
All reactions