Skip to content

Commit

Permalink
chore: add getter double in playground demo-counter (#2625)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingCaiChong committed Apr 2, 2024
1 parent fca4fa6 commit d6a8129
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/playground/src/stores/demo-counter.ts
Expand Up @@ -8,6 +8,9 @@ export const useCounter = defineStore('demo-counter', {
state: () => ({
n: 0,
}),
getters: {
double: (state) => state.n * 2,
},
})

if (import.meta.hot) {
Expand Down

0 comments on commit d6a8129

Please sign in to comment.