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
@@ -86,9 +86,9 @@ Once a store is created, you'll be able to add subscriptions with `subscribe` an
86
86
87
87
Here's a breakdown of each binding needed when initializing a new store:
88
88
89
-
#### `reducer(type, state, payload = {})`
89
+
#### `reducer(state, { type, payload } = action)`
90
90
91
-
> `type (string)`: The action dispatched.<br/>`state (object)`: A copy of the current state object.<br/>`payload (object={})`: The payload given during dispatch.
91
+
> `state (object)`: A copy of the current state object.<br/>`action ({ type, payload })`: The dispatched action type and its payload.
92
92
93
93
Creates a new version of state and returns it, based on the `type` and `payload`. If the return value is falsy, nothing happens.
0 commit comments