Skip to content

Commit 63af52f

Browse files
yuriyyakymtimdorr
authored andcommitted
Update accessing-store.md (#1163)
- Consistent indent - Consistent semicolons - Removed endless recurrency from example App component
1 parent 5199d9d commit 63af52f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/using-react-redux/accessing-store.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff 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
5353
const 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
8787
function 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

0 commit comments

Comments
 (0)