An open API service indexing awesome lists of open source software.

https://github.com/schafeld/store-without-vuex

Share data across components in a reactive manner, without VueX. See CodeSandbox
https://github.com/schafeld/store-without-vuex

javascript vuejs

Last synced: 2 months ago
JSON representation

Share data across components in a reactive manner, without VueX. See CodeSandbox

Awesome Lists containing this project

README

          

# Store without VueX

> You don't need VueX for a rudimentary shopping cart or to share just a single piece of data across several components. Observable to the rescue!

Simple implementation of a store without the overhead of adding VueX.

Inspired by:
https://vuedose.tips/tips/creating-a-store-without-vuex-in-vue-js-2-6 and
https://vuejs.org/v2/api/#Vue-observable

## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run all tests
npm test
```

For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

[![Edit store-without-vuex](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/store-without-vuex-yhdlz?fontsize=14)