Get started with vuex CDN
MIT licensed
Vuex is a state management library for Vue.js applications.
Tags:- vue
- Application
- Architecture
- Flux
Stable version
Copied!
How to start using vuex CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with vuex CDN - cdnhub.io</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script>
<script src="https://cdn.cdnhub.io/vuex/4.1.0/vuex.cjs.js"></script>
</head>
<body>
<div id="app">
<button @click="increment">Click me</button>
<p>Count: {{ count }}</p>
</div>
<script>
const store = new Vuex.Store({
state: {
count: 0
},
mutations: {
increment(state) {
state.count++
}
}
})
new Vue({
el: '#app',
store,
methods: {
increment() {
this.$store.commit('increment')
}
}
})
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
0.4.1
0.4.2
0.5.0
0.5.1
0.6.1
0.6.2
0.6.3
0.7.0
0.7.1
0.8.0
0.8.1
0.8.2
1.0.0
1.0.0-rc
1.0.0-rc.2
1.0.1
2.0.0
2.0.0-rc.1
2.0.0-rc.3
2.0.0-rc.4
2.0.0-rc.5
2.0.0-rc.6
2.1.0
2.1.1
2.1.2
2.1.3
2.2.0
2.2.1
2.3.0
2.3.1
2.4.0
2.4.1
2.5.0
3.0.0
3.0.1
3.1.0
3.1.1
3.1.2
3.1.3
3.2.0
3.5.1
3.6.0
3.6.1
3.6.2
4.0.0
4.0.0-alpha.1
4.0.0-beta.1
4.0.0-beta.2
4.0.0-beta.3
4.0.0-beta.4
4.0.0-rc.1
4.0.0-rc.2
4.0.1
4.0.2
*** 4.1.0