Skip to content

Commit 8ea9d52

Browse files
authored
Update why-rtk-is-redux-today.md (#4719)
1 parent d0d0e43 commit 8ea9d52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/introduction/why-rtk-is-redux-today.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const addTodo = text => ({
7979

8080
export const todoToggled = id => ({
8181
type: TODO_TOGGLED,
82-
payload: { id }
82+
payload: id
8383
})
8484

8585
export const todosReducer = (state = [], action) => {
@@ -92,7 +92,7 @@ export const todosReducer = (state = [], action) => {
9292
})
9393
case TODO_TOGGLED:
9494
return state.map(todo => {
95-
if (todo.id !== action.payload.id) return todo
95+
if (todo.id !== action.payload) return todo
9696

9797
return {
9898
...todo,

0 commit comments

Comments
 (0)