-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to pass data to sub component. #3
Comments
There are many ways, you can use a vuex store, you can set data on the
router with the "meta" property, you can just fetch data from the sidebar
directly, there's no good answer here it depends of the rest of your
architecture
Le mer. 17 juil. 2019 à 03:04, ChiliConSql <[email protected]> a
écrit :
… Thank you for the example. This was terrific, but how do you pass data to
sub component?
Example: how would i pass different data or props to the Sidebar component
from the route component?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AAK4HNMMF6DGT36KGBRTLWLP7ZVYHA5CNFSM4IEJIWWKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7TM3KQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAK4HNIHRGUXOMZ3B6AN7TTP7ZVYHANCNFSM4IEJIWWA>
.
|
i would prefer to use vuex. |
If your project has vuex, than good, if it doesn't, importing vuex just for
the layout is not really effective nor optimized.
Vuex is used to share state, the layout system is not really based on
shared state but on route state or view state, so the best place to handle
the layout is in the router and the main App component.
Le sam. 26 oct. 2019 à 20:10, Günter Bailey <[email protected]> a
écrit :
… i would prefer to use vuex.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AAK4HNIDO36V2CONL3UPYQTQQSBYFA5CNFSM4IEJIWWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECKNX3I#issuecomment-546626541>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAK4HNNBM4LMIDSGXIVN563QQSBYFANCNFSM4IEJIWWA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for the example. This was terrific, but how do you pass data to sub component?
Example: how would i pass different data or props to the Sidebar component from the route component?
The text was updated successfully, but these errors were encountered: