File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,13 @@ export default connect(
4747 mapDispatch,
4848 null ,
4949 { context: MyContext }
50- )(MyComponent)
50+ )(MyComponent);
5151
5252// or, call connect as normal to start
5353const ConnectedComponent = connect (
5454 mapState,
5555 mapDispatch
56- )(MyComponent)
56+ )(MyComponent);
5757
5858// Later, pass the custom context as a prop to the connected component
5959< ConnectedComponent context= {MyContext} / >
@@ -85,13 +85,13 @@ const storeB = createStore(reducerB);
8585
8686// supply the context instances to Provider
8787function App () {
88- return (
89- < Provider store= {storeA} context= {ContextA} / >
90- < Provider store= {storeB} context= {ContextB}>
91- < App / >
92- < / Provider>
93- < / Provider>
94- );
88+ return (
89+ < Provider store= {storeA} context= {ContextA} / >
90+ < Provider store= {storeB} context= {ContextB}>
91+ < RootModule / >
92+ < / Provider>
93+ < / Provider>
94+ );
9595}
9696
9797// fetch the corresponding store with connected components
@@ -132,7 +132,7 @@ function MyConnectedComponent() {
132132 // component where it can be used in lifecycle methods
133133 }}
134134 < / ReactReduxContext .Consumer >
135- )
135+ );
136136}
137137```
138138
You can’t perform that action at this time.
0 commit comments