Nuxt/test/fixtures/basic/pages/store.vue
Alexander Lichter b2eee1772e feat: add store module HMR (#4582)
* feat: add store module HMR

* fix: replace export with window.$nuxt

Thanks to @pi0 for the suggestion :)

* refactor: apply only in dev mode on client side

* test: make store module test more descriptive

* fix: clear modules to apply HMR

* fix: remove console.log

* fix: e2e tests

* refactor: use void
2018-12-19 16:22:00 +01:00

26 lines
534 B
Vue

<template>
<div>
<h1>foo/bar/baz: {{ baz }}</h1>
<br>
<h2>index/counter: {{ $store.state.counter }}</h2>
<br>
<h3>foo/blarg/getVal: {{ getVal }}</h3>
<br>
<h4>foo/bab/getBabVal: {{ getBabVal }}</h4>
<br>
<button @click="$store.commit('increment')">+1</button>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
computed: {
...mapGetters('foo/bar', ['baz']),
...mapGetters('foo/blarg', ['getVal']),
...mapGetters('bab', ['getBabVal'])
}
}
</script>