Do we still need Vuex? Vuex is an awesome state management library. It’s simple and integrates well with Vue. But the new composition API in Vue 3 exposes the underlying reactivity system and introduces new ways for structuring our applications. The new reactivity system is so powerful that it can be used for centralized state management.

Today we are going to be using the composition API to create our own state management store similar to Vuex. Then at the end of the video, we will compare the differences between the two solutions to determine which one you should use in your application.

⚡ RESOURCES ⚡
Source Code - https://github.com/codingwithjustin/vuex-clone-vue-3
Vuex - https://vuex.vuejs.org/
Vue 3 - https://v3.vuejs.org/
Composition API - https://composition-api.vuejs.org/
Do we need Vuex? - https://vuejsdevelopers.com/2020/10/05/composition-api-vuex/
Provide & Inject Tutorial - https://www.youtube.com/watch?v=dOxjzgZpTfk

⭐ TIMESTAMPS ⭐

  • 0:00 - Intro
  • 0:44 - Why Vuex?
  • 1:45 - Global State Composition API
  • 2:57 - Vuex Pattern in Composition API
  • 4:05 - Provide and Inject
  • 4:45 - So… do we need vuex?
  • 5:00 - Conclusion

#vuex #vue #api #javascript

Creating a Vuex Clone with Vue 3 Composition API
3.25 GEEK