Pass data from Persistent Layout to view as prop? #910
Unanswered
thomas-dm
asked this question in
Help (Vue)
Replies: 1 comment
-
@thomas-dm This could become tricky as there's no direct relationship between the layout and the component. I think the best approach would be to use Vuex (Vue 2) or a shared reactive state (Vue 3). Hope this helps! |
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.
-
Hello everyone,
I have a child view that is contained within a Persistent Layout.
The layout is used to display multiple tabs and other common elements to all child views, and it’s also polling an API every x second to fetch some data that should be used by every child view.
My question is: how can I pass that data from the Persistent Layout to the child views as a prop? The child views need to use and transform that data using
computed
methods. Is there a clean and simple way to do this with Persistent Layouts, or should I resolve to using a store?Thank you
Beta Was this translation helpful? Give feedback.
All reactions