Skip to content

Commit

Permalink
Update why-rtk-is-redux-today.md (#4719)
Browse files Browse the repository at this point in the history
  • Loading branch information
muyangren918 authored Jul 18, 2024
1 parent d0d0e43 commit 8ea9d52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/introduction/why-rtk-is-redux-today.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const addTodo = text => ({

export const todoToggled = id => ({
type: TODO_TOGGLED,
payload: { id }
payload: id
})

export const todosReducer = (state = [], action) => {
Expand All @@ -92,7 +92,7 @@ export const todosReducer = (state = [], action) => {
})
case TODO_TOGGLED:
return state.map(todo => {
if (todo.id !== action.payload.id) return todo
if (todo.id !== action.payload) return todo

return {
...todo,
Expand Down

0 comments on commit 8ea9d52

Please sign in to comment.