3.6.2 • Published 3 months ago

vuex v3.6.2

Weekly downloads
1,513,007
License
MIT
Repository
github
Last release
3 months ago

Vuex 4

This is the Vue 3 compatible version of Vuex. The focus is compatibility, and it provides the exact same API as Vuex 3, so users can reuse their existing Vuex code for Vue 3.

Status: Alpha

All Vuex 3 feature works. There are a few breaking changes described in a later section, so please check them out. You can find basic usage with both option and composition API at example folder.

Please note that it's still unstable, and there might be bugs. Please provide us feedback if you find anything. You may use vue-next-webpack-preview to test out Vue 3 with Vuex 4.

Breaking changes

Installation process has changed

To align with the new Vue 3 initialization process, the installation process of Vuex has changed as well.

You should use a new createStore function to create a new store instance.

import { createStore } from 'vuex'

const store = createStore({
  state () {
    return {
      count: 1
    }
  }
})

This is technically not a breaking change because you could still use new Store(...) syntax. However, to align with Vue 3 and also with Vue Router Next, we recommend users to use createStore function instead.

Then to install Vuex to Vue app instance, pass the store instance instead of Vuex.

import { createApp } from 'vue'
import store from './store'
import App from './APP.vue'

const app = createApp(Counter)

app.use(store)

app.mount('#app')

Kown issues

  • The code is kept as close to Vuex 3 code base as possible, and there're plenty of places where we should refactor. However, we are waiting for all of the test cases to pass before doing so (some tests require Vue 3 update).
  • TypeScript support is not ready yet. Please use JS environment to test this for now.

TODOs as of 4.0.0-alpha.1

  • Add TypeScript support
  • Make all unit test working
  • Refactor the codebase
  • Update the build system to align with Vue 3
  • Update docs
4.0.2

3 months ago

4.0.1

4 months ago

4.0.0

8 months ago

3.6.2

8 months ago

3.6.1

8 months ago

4.0.0-rc.2

10 months ago

3.6.0

10 months ago

4.0.0-rc.1

11 months ago

4.0.0-beta.4

1 year ago

3.5.1

1 year ago

4.0.0-beta.3

1 year ago

3.5.0

1 year ago

3.4.0

1 year ago

4.0.0-beta.2

1 year ago

4.0.0-beta.1

1 year ago

3.3.0

1 year ago

3.2.0

1 year ago

4.0.0-alpha.1

2 years ago

3.1.3

2 years ago

3.1.2

2 years ago

3.1.1

2 years ago

3.1.0

3 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.5.0

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.3.1

4 years ago

2.3.0

4 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

1.0.1

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

1.0.0

5 years ago

2.0.0

5 years ago

2.0.0-rc.6

5 years ago

2.0.0-rc.5

5 years ago

2.0.0-rc.4

5 years ago

2.0.0-rc.3

5 years ago

2.0.0-rc.1

5 years ago

1.0.0-rc.2

5 years ago

1.0.0-rc

5 years ago

0.8.2

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.3

5 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago