Skip to content

Commit

Permalink
updated example is missing import
Browse files Browse the repository at this point in the history
  • Loading branch information
yinshanyang authored and seantcoyote committed Jan 14, 2018
1 parent 18a915a commit 8fd4fae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/recipes/IsolatingSubapps.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ initializes the store in the constructor:
```js
import React, { Component } from 'react'
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import reducer from './reducers'
import App from './App'

Expand All @@ -61,7 +62,7 @@ class SubApp extends Component {
super(props)
this.store = createStore(reducer)
}

render() {
return (
<Provider store={this.store}>
Expand All @@ -78,4 +79,3 @@ This pattern is *not* recommended for parts of the same app that share data.
However, it can be useful when the bigger app has zero access to the smaller apps' internals,
and we'd like to keep the fact that they are implemented with Redux as an implementation detail.
Each component instance will have its own store, so they won't “know” about each other.

0 comments on commit 8fd4fae

Please sign in to comment.