[Vuejs]-Unable to update component data from instance in Vue3

0๐Ÿ‘

I think the best solution is to use an application-level store, you avoid a lot of unnecessary headaches, and the readability of the application definitely improves.

you can use either https://next.vuex.vuejs.org/ or https://pinia.esm.dev/

another alternative is to use an event bus, with vue 3 it is better to use https://github.com/developit/mitt
but to use data across various components, it is always better to use the store

Leave a comment