Compare commits
1 Commits
cfe5b13362
...
159f168230
| Author | SHA1 | Date | |
|---|---|---|---|
| 159f168230 |
@@ -26,7 +26,7 @@ createStore('counter', {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## <StateProvider />
|
## `<StateProvider />`
|
||||||
|
|
||||||
A React component used to provide all of the created stores as context. You can wrap your entire app in this component to get access to all of the stores that exist. Alternatively, the component takes a `names` prop string that you can use to control which store providers are used. The string should be a comma-delimited list of stores by name.
|
A React component used to provide all of the created stores as context. You can wrap your entire app in this component to get access to all of the stores that exist. Alternatively, the component takes a `names` prop string that you can use to control which store providers are used. The string should be a comma-delimited list of stores by name.
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ A React component used to provide all of the created stores as context. You can
|
|||||||
</StateProvider>
|
</StateProvider>
|
||||||
```
|
```
|
||||||
|
|
||||||
## useStore(name)
|
## `useStore(name)`
|
||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user