dispatch
Send an update to store.
@parameters
Name | Type | Description |
action |
| Action label. |
newState |
| New state that will merge to current state. Exceeded properties are not restricted. If you use a function for this, it should be look like: |
@return
Type | Description |
|
Examples:
Another option for updating the state is using function as second parameter, we can now omit the code from line 4 on the first example because the current state is already on the argument list of callback function.
Last updated