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
https://redux-toolkit.js.org/tutorials/intermediate-tutorial
...I prefer always having payload be an object, so I made it action.payload.id instead
However, the actual code snippet this is referring to does not use action.payload.id It uses action.payload directly:
action.payload.id
toggleTodo(state, action) { const todo = state.find(todo => todo.id === action.payload) if (todo) { todo.completed = !todo.completed } }
The text was updated successfully, but these errors were encountered:
Obsolete due to #905 .
Sorry, something went wrong.
No branches or pull requests
https://redux-toolkit.js.org/tutorials/intermediate-tutorial
However, the actual code snippet this is referring to does not use
action.payload.id
It uses action.payload directly:The text was updated successfully, but these errors were encountered: