Vuex is a state management library for Vue.js applications. It acts as a centralized store for all the components in an application, with rules ensuring that the state can only be mutated in a predictable fashion. Vuex also integrates with Vue's reactivity system, allowing the store to update components when its state changes.
Vuex to Pinia. How to Migrate an Existing App
Vue.js London 2023Vue.js London 2023
24 min
Vuex to Pinia. How to Migrate an Existing App
Top Content
Pinia is the officially recognized state management library for Vue.js, with a simpler API than VueX and TypeScript support. Migrating to Pinia involves creating a root store, defining stores, and using store2refs or the exported use store in components. Testing real store behavior requires creating a Pinia instance, while component testing involves importing useStore and using mapState and mapAction from vigname. Migrating tests involves creating a local view and using the Pinia plugin, and Vuex and Pinia can coexist but should be migrated module by module. Store persistence can be achieved through subscribing to store changes or using a watcher.
Modern State Management with Vue 3
Vue.js London Live 2021Vue.js London Live 2021
22 min
Modern State Management with Vue 3
Top Content
Vanessa introduces Vue Free and discusses the benefits of using the Composition API. The order of execution and grouping logical units using the Composition API is explained. The Composition API is used for state management and refactoring components. The speaker shares their initial experience with state management using Vuex. Composables are explored as an alternative for state management in Vue 3.
Structuring A Massive Vuex Store
Vue.js London Live 2021Vue.js London Live 2021
21 min
Structuring A Massive Vuex Store
The Talk discusses the process of structuring a massive UX store using modules in Vue.js. It covers topics such as namespaces, triggering mutations, and improving store usage with map mutations. The importance of refactoring the folder structure and using separate files for actions, getters, and mutations is highlighted. The Talk concludes by mentioning the possibility of adding additional layers for splitting mutations and providing contact information for further inquiries.
Vuex? No, it’s X(state)Vue for UI
Vue.js London Live 2021Vue.js London Live 2021
33 min
Vuex? No, it’s X(state)Vue for UI
This Talk introduces state management in Vue, focusing on the Xstate library for managing state machines in UI components. The bottom-up approach in component development can lead to complexity and challenges over time. Xstate is a JavaScript and TypeScript library designed specifically for managing state machines and state charts for UI components. The Talk provides examples of creating a toggle component using Xstate and emphasizes the advantages of using Xstate, such as code reuse, precise testing, and easy maintenance. The speaker encourages developers to plan ahead and consider state, component, and feature design to write better code.