Vue Teddy Store is the easiest - next-generation - store for Vue application. Check out the documentation to find more about its minimal & delightful API.
<!-- start of .vue file -->
<script>
import { sync } from 'vue-teddy-store'
export default {
computed: {
products: sync('products.items'),
},
}
</script>
<!-- End of .vue file -->
<script>
/* part of your main.js file */
import Vue from 'vue'
import TeddyStore from 'vue-teddy-store'
const stores = new TeddyStore()
stores.add('products', {
state: {
items: [
{
name: 'Berries',
},
],
},
})
Vue.use(stores)
/* end part of your main.js file */
</script>
Vue Teddy Store is and always will be free and open source.
This project, so far, exists only because of the will of one person. If you use it and thinks it should become better, cover more cases or be more stable, consider pushing pull requests
as well as reaching out through issues
for ideas, bugs and questions.
Author: gahabeen
GitHub: https://github.com/gahabeen/vue-teddy-store
#vuejs #vue #javascript #vue-js