Skip to content

Instantly share code, notes, and snippets.

@Dirk94
Last active February 1, 2021 12:19
Show Gist options
  • Select an option

  • Save Dirk94/6064df91e1a86a3298cb04329221a7ca to your computer and use it in GitHub Desktop.

Select an option

Save Dirk94/6064df91e1a86a3298cb04329221a7ca to your computer and use it in GitHub Desktop.
<template>
<div id="app">
<h1>Todo App</h1>
<ul>
<li v-for="todo in todos" :key="todo.message">
{{ todo.message }}
</li>
</ul>
</div>
</template>
<script>
export default {
name: 'App',
// The computed todos property will pull the todos from the Vuex state object.
computed: {
todos() {
return this.$store.state.todos;
},
},
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment