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
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ function Component() {
27
27
28
28
__⚠️ To use `useSubstate`, you will need the unstable and experimental React 16.7.0-alpha.__
29
29
30
-
`useSubstate` can also be used together with [react-redux][] in your existing [Redux][] application. Check out [Comparison To Redux][#comparison-to-redux] for more infomration.
30
+
`useSubstate` can also be used together with [react-redux][] in your existing [Redux][] application. Check out [Comparison To Redux](#comparison-to-redux) for more information.
31
31
32
32
## Installation
33
33
@@ -47,7 +47,7 @@ npm install --save use-substate
47
47
48
48
## Usage
49
49
50
-
You can use `useSubstate` with your existing [Redux][] store or with a simple alternative (like [`create-state`](https://github.com/philipp-spiess/create-state)). This package will export a [React Context](https://reactjs.org/docs/context.html) consumer (`SubstateContext`) as well the `useSubstate` hook.
50
+
You can use `useSubstate` with your existing [Redux][] store or with a simple alternative (like [create-state](https://github.com/philipp-spiess/create-state)). This package will export a [React Context](https://reactjs.org/docs/context.html) consumer (`SubstateContext`) as well the `useSubstate` hook.
51
51
52
52
This custom hook will expose an API similar to [`useReducer`](https://reactjs.org/docs/hooks-reference.html#usereducer). The only argument for `useSubstate` is a `selectSubstate` function which is used to select parts of your state to be used within the component that uses the hook. This allows `useSubstate` to bail out if unnecessary parts change. Every component that uses this custom hook will automatically subscribe to the store.
53
53
@@ -102,7 +102,7 @@ ReactDOM.render(
102
102
103
103
In opposite to [react-redux][], this library only requires a `mapState` function. It is meant to call the `dispatch` function with the action directly. Advanced concepts like `connectAdvanced` or `mapDispatchToProps` are deliberately not supported.
104
104
105
-
To use `useSubstate` with your current [`react-redux`][] React application, find the react-redux `Provider` and make sure to wrap it with a `SubstateProvider`:
105
+
To use `useSubstate` with your current [react-redux][] React application, find the react-redux `Provider` and make sure to wrap it with a `SubstateProvider`:
0 commit comments