From: Eduardo San Martin Morote Date: Mon, 15 Nov 2021 15:48:16 +0000 (+0100) Subject: chore: add talk demo X-Git-Tag: @pinia/testing@0.0.6~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d7f1d47306fde1952f4773a7b0bce91bc87da81f;p=thirdparty%2Fvuejs%2Fpinia.git chore: add talk demo --- diff --git a/packages/playground/src/stores/demo-counter.ts b/packages/playground/src/stores/demo-counter.ts new file mode 100644 index 00000000..59235f49 --- /dev/null +++ b/packages/playground/src/stores/demo-counter.ts @@ -0,0 +1,11 @@ +import { defineStore, acceptHMRUpdate } from 'pinia' + +export const useCounter = defineStore('counter', { + state: () => ({ + n: 0, + }), +}) + +if (import.meta.hot) { + import.meta.hot.accept(acceptHMRUpdate(useCounter, import.meta.hot)) +} diff --git a/packages/playground/src/views/DemoCounter.vue b/packages/playground/src/views/DemoCounter.vue new file mode 100644 index 00000000..c80cb1b3 --- /dev/null +++ b/packages/playground/src/views/DemoCounter.vue @@ -0,0 +1,21 @@ + + +