Last active
August 1, 2022 08:30
-
-
Save fadamakis/94f24f2abf2dc18ead9612fff1c1560e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { defineStore } from 'pinia' | |
export const useFellowship = defineStore('fellowship', { | |
state: () => { | |
return { heroes: ['Aragorn', 'Legolas', 'Gimli', 'Gandalf'] } | |
}, | |
actions: { | |
addHero(hero) { | |
this.heroes.push(hero) | |
}, | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment