]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
chore: update defineStore usage in playground
authorEduardo San Martin Morote <posva13@gmail.com>
Mon, 10 Mar 2025 08:05:09 +0000 (09:05 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 10 Mar 2025 08:05:09 +0000 (09:05 +0100)
packages/playground/src/stores/cart.ts
packages/playground/src/stores/jokesUsePromised.ts

index 210b60562d75871a607db42c55dadd0e45e4328d..36dd5d3238e118cc2583c9edb96fca20d07998c0 100644 (file)
@@ -1,8 +1,7 @@
 import { defineStore } from 'pinia'
 import { useUserStore } from './user'
 
-export const useCartStore = defineStore({
-  id: 'cart',
+export const useCartStore = defineStore('cart', {
   state: () => ({
     rawItems: [] as string[],
   }),
index c7a4820ee8a6c95639e45d9655dd63ae65753dcc..744d5678f68f0cc93d7dc586eac44a15c606fef3 100644 (file)
@@ -3,9 +3,7 @@ import { getRandomJoke, Joke } from '../api/jokes'
 import { usePromise } from 'vue-promised'
 import { ref, watch } from 'vue'
 
-export const useJokes = defineStore({
-  id: 'jokes-vue-promised',
-
+export const useJokes = defineStore('jokes-vue-promised', {
   state: () => {
     const promise = ref(getRandomJoke())