source: ReserveNGo-frontend/src/stores/counter.js@ 590f667

Last change on this file since 590f667 was 590f667, checked in by Ljubomir Ilievski <ilievski.ljubomir@…>, 3 months ago

Added Initial frontend

  • Property mode set to 100644
File size: 306 bytes
Line 
1import { ref, computed } from 'vue'
2import { defineStore } from 'pinia'
3
4export const useCounterStore = defineStore('counter', () => {
5 const count = ref(0)
6 const doubleCount = computed(() => count.value * 2)
7 function increment() {
8 count.value++
9 }
10
11 return { count, doubleCount, increment }
12})
Note: See TracBrowser for help on using the repository browser.