Compare commits

..

1 Commits

Author SHA1 Message Date
159f168230 docs: add details to readme 2019-03-22 14:54:27 -07:00

View File

@@ -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: