You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,12 +201,12 @@ class FooItems {
201
201
}
202
202
203
203
constfooBar=newFooItems()
204
-
fooBar.addToFoo("bop")
204
+
fooBar.addItem("bop")
205
205
```
206
206
207
207
Now when the `addItem` method is called, `dispatch` will tell your store to begin the state update process. Your reducer receives the action type and payload.
208
208
209
-
The next step being that your reducer could have a logic branch on the action type called `ADD_FOO_ITEM` which adds the given item to state, then returns the resulting new state.
209
+
The next step being that your reducer could have a logic branch on the action type called `ADD_ITEM` which adds the given item to state, then returns the resulting new state.
210
210
211
211
Finally, the result would then be handed over to `bindState`.
0 commit comments