docs: fix a grammatical error (#4183)

Co-authored-by: dan <dan.abramov@gmail.com>
This commit is contained in:
Sofya Tuymedova
2022-02-08 00:30:31 +03:00
committed by GitHub
parent cb6e1d0807
commit 466809e8f4

View File

@@ -224,7 +224,7 @@ Remove all the state setting logic. What you are left with are three event handl
* `handleChangeTask(task)` is called when the user toggles a task or presses "Save".
* `handleDeleteTask(taskId)` is called when the user presses "Delete".
Managing state with reducers is slightly different from directly setting state. Instead of telling React "what to do" by setting state, you specify "what the user just did" by dispatching "actions" from your event handlers. (The state update logic will live elsewhere!) So instead of "setting `tasks`" via event handler, you're dispatching an "added/changed/deleted a task" action. This is more descriptive of the user's intent.
Managing state with reducers is slightly different from directly setting state. Instead of telling React "what to do" by setting state, you specify "what the user just did" by dispatching "actions" from your event handlers. (The state update logic will live elsewhere!) So instead of "setting `tasks`" via an event handler, you're dispatching an "added/changed/deleted a task" action. This is more descriptive of the user's intent.
```js
function handleAddTask(text) {