Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- import { mapGetters, mapActions } from "vuex";
- export default {
- name: "Todos",
- computed: mapGetters(["todos"]),
- methods: {
- ...mapActions(["fetchTodos", 'removeTodo']),
- onDelete(id) {
- this.removeTodo(id);
- }
- },
- created() {
- this.fetchTodos();
- }
- };
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement