0👍
Sharing data across Vue Components.
- Parent -> Child. To pass data from Parent to Child you can use Props,
- Child -> Parent. To pass data from Child to Parent you can use Events with
$emit('my-event')
. See Listening to Child Components Events - Unrelated components can also share data using Event Bus with this.$root.$emit.
If using Vuex, I’d say that is the best way to share data across unrelated components.
- [Vuejs]-Vue.config.js could not recognize require('webpack')
- [Vuejs]-Vue js not rendering VdtnetTable. What might be the issue
Source:stackexchange.com