-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
watch-us-build-trello/src/store.js
Lines 45 to 48 in a742aab
| MOVE_TASK (state, { fromTasks, toTasks, fromTaskIndex, toTaskIndex }) { | |
| const taskToMove = fromTasks.splice(fromTaskIndex, 1)[0] | |
| toTasks.splice(toTaskIndex, 0, taskToMove) | |
| }, |
This mutation doesn't affect the state at all, instead it modifies the arrays that are passed in as arguments. It works because the passed in values arrays happen to be the arrays from the store, but I don't think you're supposed to be modifying them directly.
Please discuss, I could be misunderstanding something.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels