sonicoder86 / todomvc-vue-composition-api

TodoMVC built with Vue 3 Composition Api and Vuex

Home Page:https://blacksonic.github.io/todomvc-vue-composition-api/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I have a question

qiqingfu opened this issue · comments

commented

If all the items in the list are selected, then click toggle-all should all be unchecked?

I don't understand this line of code in the src/store/mutations/todo.js file.

const areAllCompleted = state => state.length && selectCompleted(state).length === state.length;

maybe it should be

const areAllCompleted = ({ todos }) => todos.length && selectCompleted(todos).length === todos.length;

I am just explaining my idea, thank you very much for this project, I can learn Vue3 through it.