vue-statex
v1.0.1
Published
a dead simple state management library for VueJS (typescript support)
Downloads
1
Readme
Vue-Statex
a dead simple state management library for VueJS (typescript support)
Initial store
// store.js
import createStore from "vue-statex";
import { Store } from "./models";
const store = createStore({
count: 0,
setCount(payload: number) {
this.count++;
},
});
export { store };
export default store();
Usage in VueJS
<script>
import store from "./store";
export default {
provide() {
return {
store,
};
},
};
</script>