Compare commits
1 Commits
159f168230
...
c2ae065be7
| Author | SHA1 | Date | |
|---|---|---|---|
| c2ae065be7 |
@@ -41,7 +41,7 @@ A React component used to provide all of the created stores as context. You can
|
||||
A React [hook](https://reactjs.org/docs/hooks-reference.html) to access the store's state value, and methods to read and update it. The hook returns an object with the following properties:
|
||||
|
||||
Property | Description
|
||||
-- | --
|
||||
-------- | -----------
|
||||
`state` | The current state value of the store.
|
||||
`commit(name, ...args)` | Executes mutations, which synchronously change the state and update context, causing components that use the context to re-render.
|
||||
`dispatch(name, ...args)` | Fires actions, which perform async work and use mutations to update state. Returns a Promise that resolves when the action is complete.
|
||||
|
||||
Reference in New Issue
Block a user