Skip to content

Commit 1752ccc

Browse files
committed
Merge pull request #178 from caljrimmer/next
Added Props store option to createDevTools.js
2 parents 7e3f605 + 7d7370e commit 1752ccc

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/createDevTools.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,22 @@ export default function createDevTools(children) {
1313

1414
return class DevTools extends Component {
1515
static contextTypes = {
16-
store: PropTypes.object.isRequired
16+
store: PropTypes.object
17+
};
18+
19+
static propTypes = {
20+
store: PropTypes.object
1721
};
1822

1923
static instrument = () => enhancer;
2024

2125
constructor(props, context) {
2226
super(props, context);
23-
this.liftedStore = context.store.liftedStore;
27+
if (context.store) {
28+
this.liftedStore = context.store.liftedStore;
29+
} else {
30+
this.liftedStore = props.store.liftedStore;
31+
}
2432
}
2533

2634
render() {

0 commit comments

Comments
 (0)