For my Vue 2.x app, I am trying to pass data from one sibling component to another sibling component via root Vue instance. I have applied the solution from this answer. But, it's not working for my app. It seems that data is not coming to the ItemDetails.vue
component from ItemList.vue
component properly.
Asked
Active
Viewed 59 times
0

user1896653
- 3,247
- 14
- 49
- 93
-
1Why not using Vuex as explained here: https://stackoverflow.com/a/49702934/8816585 ? – kissu Mar 26 '22 at 22:16
-
The solution outlined in the linked answer only works if both components are mounted at the same time. – Matt Schlosser Mar 26 '22 at 23:35
-
1You don't need to emit events in this use case since you are using simple routing. You can add pass props through the router to another component. Here is your code with modification: https://codesandbox.io/s/veevalidate-components-vuetify-forked-gwn3yq – Kalimah Mar 27 '22 at 01:41