We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think these two syntaxes are equivalent, but is one of them best practice? (lesson code is at the bottom)
// getters getTask: state =>(id) => { for (const column of state.board.columns) { for (const task of column.tasks) { if (task.id === id) { return task } } } }
/src/store.js
... state: { board }, getters: { // <-- Add a getter getTask (state) { return (id) => { for (const column of state.board.columns) { for (const task of column.tasks) { if (task.id === id) { return task } } } } } }, mutations: {} })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think these two syntaxes are equivalent, but is one of them best practice? (lesson code is at the bottom)
/src/store.js
The text was updated successfully, but these errors were encountered: