Last active
August 1, 2022 08:29
-
-
Save fadamakis/a22111c75933b0d75c84dedaeadab84f 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
<script> | |
import { useFellowship } from '@/stores/fellowship' | |
export default { | |
setup() { | |
const fellowship = useFellowship() | |
// Access to the state | |
// can be done directly | |
console.log(fellowship.heroes) | |
// Using an action | |
fellowship.addHero('Boromir') | |
}, | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment