The reactive function from Vue3 makes our object (provided by the abstract data() method) reactive. This way I can later ensure that only Objects will be used for the state. This article explains how to set up Vuex in a Vue CLI 3 project. The Vuex store is made up of the state, mutations, actions, and getters. Next, we look at the constructor which initializes our data and makes it reactive (the part that I want to encapsulate). At the time of writing, Vue 3 hasn't officially been released, and Vuex may add support for this natively. I dont want to have one global state (although this would also be easy to implement) furthermore, I want to have different stores handling different parts of my application. It also integrates with Vue's official devtools extension When they sign in, you set the details in localStorage, and when they log our, you remove the details from localStorage. When the app loads, you can pull the user details from localStorage and into the initial state: If youre working with data that does not require super tight security restrictions, then this works pretty well. Vuex is the state management library for Vue. I've tried in several projects and it is always undefined. For this project, we want to create a vue application that has vuex and vue-router. Then in our application we may want to show the user details: Vue 3 + Vuex 4 - useStoreModule composable. Vuex is a state management pattern + library for Vue.js applications. In this tutorial, you will learn how to use Vuex in your Vue 3 applications. app.use (store); so that the store can be used with our Vue 3 app. It doesnt require classes, so it is compatible with Vue 3 and the composition API. But some of the ways you wire-up the store are different. I wont spend time covering the basics but just quickly remind the conceptual idea. In the following examples, we will see that even when things get more complicated, it is unnecessary to manage state globally. You have two solutions for using Vuex with the Composition API. Opinion: WordPress is Still Pretty Darn Great. But refactoring will still be a problem. For that, I will create a file called click-store.ts which keeps track of clicks on a given button (basically a store for this little blog entry: https://medium.com/@mario.brendel1990/vue-3-alpha-has-started-d1b3b49869a4). We can take advantage of localStorage to keep a copy of the users information, however. The results are same as earlier. Please keep in mind that you have to provide the state for the template. That is also why I recommend you to use Typescript. Furthermore, with typescript in combination, we get type checks and code completion out of the box which makes life way way easier :). Otherwise, it tells them they need to log in. Thus, we can install it with the following command. As you build out Vue.js applications and they begin to reach a certain size, you will likely run into the need for global state management. The application state can only be updated by dispatching actions within a component that will then trigger mutations in the store. It makes managing state in Vue applications easier by providing a central storage for the state (and other computations) called a store. In this article, I am going to share with you my approach for creating and managing a global store in Vue 3 without Vuex. Can't find anything to solve this seemingly obvious issue. Any help is appreciated, I really need to look at the store for this project, I might move back to vue 2 if this continues, Thank you