8000 GitHub - xkyong/vuex-source-code-learning: 🗃️ Centralized State Management for Vue.js.Vuex 3.x for Vue 2.x and Vuex 4.x for Vue 3.x.
[go: up one dir, main page]

Skip to content

🗃️ Centralized State Management for Vue.js.Vuex 3.x for Vue 2.x and Vuex 4.x for Vue 3.x.

License

Notifications You must be signed in to change notification settings

xkyong/vuex-source-code-learning

 
 

Repository files navigation

Vuex

npm ci status

该版本是Vuex 3.x版本,适配Vue2项目开发。

调试注意事项:

首先,在 examples/webpack.config.js 文件中增加 sourcemap: true 的配置项:

module.exports = {
  // 省略其他配置项
  // 开启sourcemap才好调试
  devtool: 'sourcemap',
}

然后,通过如下命令安装依赖并启动服务:

$ yarn install
$ yarn dev

最后,浏览器打开 http://localhost:8080/ ,然后以 shopping-cart 为例子,打开浏览器面板 source, 在左侧找到 webapck:// 下的文件夹(主要是 srcexamples),设置断点,过完基本vuex核心的源码操作过程。

调试过程中,做好代码注释工作。


🔥 HEADS UP! You're currently looking at Vuex 3 branch. If you're looking for Vuex 4, please check out main branch.


Vuex is a state management pattern + library for Vue.js applications. It serves 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. It also integrates with Vue's official devtools extension to provide advanced features such as zero-config time-travel debugging and state snapshot export / import.

Learn more about Vuex at "What is Vuex?", or get started by looking into full documentation.

Documentation

To check out docs, visit vuex.vuejs.org.

Examples

Running the examples:

$ npm install
$ npm run dev # serve examples at localhost:8080

Questions

For questions and support please use the Discord chat server or the official forum. The issue list of this repo is exclusively for bug reports and feature requests.

Issues

Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

Changelog

Detailed changes for each release are documented in the release notes.

Stay In Touch

For latest releases and announcements, follow on Twitter: @vuejs.

Contribution

Please make sure to read the Contributing Guide befor e making a pull request.

License

MIT

Copyright (c) 2015-present Evan You

About

🗃️ Centralized State Management for Vue.js.Vuex 3.x for Vue 2.x and Vuex 4.x for Vue 3.x.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 92.0%
  • TypeScript 8.0%
0