How to access to root state. #1518
Unanswered
ghost
asked this question in
Help and Questions
Replies: 2 comments
-
Certainly, I can create composable function
|
Beta Was this translation helpful? Give feedback.
0 replies
-
You could create such a function but that would defeat the purpose of splitting into multiple stores to benefit from code splitting and more. instead, you could use auto imports with unplugin-autoimport |
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 have two store modules settings and user.

Is it possible not to call each directly with
useUserStore
anduseSettingStore
, maybe, Pinia have something likeuseGlobalStore
to get root state.Hypothetical example:
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions