How to share Global data with Vue Js 2?

Answer • 1 Asked • Jul 6 2019
Im relatively new with VueJS, and I've got no clue about how to make some data globally available.

I would like to save data like API endpoints, user data and some other data that is retrieved from the API somewhere where each component can get to this data. I know I can just save this with just vanilla Javascript but I suppose there is a way to do this with VueJS.

I may be able to use the event bus system to get the data but I don't know how I can implement this system to my needs.

I would appreciate it if somebody can help me with this.

Write your answer...

On a mission to build Next-Gen Community Platform for Developers