Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

brjohnson4's avatar

Passing data to components with Vue

I have a couple of Vue components that exist on a page in Spark. In the DOM, one works in panels within the container, and the other exists outside of the container (in a sticky div at the bottom of the window). What I want to do is send data from the Vue component in the container to the sticky div component: someone will click on a button in the container that will change what is shown in the sticky div. Do I need to make the sticky div component a child of the container component (or vice versa)? Or is there a way to pass data between these components without having to nest one in the other?

Or is the answer to create a parent component that has both of these as children?

Thanks!

0 likes
3 replies
ADSOLUTION's avatar

It seems like the link above is not available now.

Please or to participate in this conversation.