How to create context like in React?

Is there a way to create a context like in React?

I found this but I would prefer to use something more “official”

If the create context is to replace redux in React,
you can use:

// store.js
export default Vue.observable({foo:'bar'}); // Vue2
// store.js
export default reactive({foo:'bar'}); // Vue3

creates a reactive object module to replace vuex in Vue.

1 Like

Thank you for this hint.
I’m going to search more about observable in Vue2, since yesterday I discovered that Vue3 “production-ready” is not available yet