mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-01-31 19:54:35 +03:00
Merge pull request #178 from caljrimmer/next
Added Props store option to createDevTools.js
This commit is contained in:
commit
1752cccd82
|
@ -13,14 +13,22 @@ export default function createDevTools(children) {
|
||||||
|
|
||||||
return class DevTools extends Component {
|
return class DevTools extends Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
store: PropTypes.object.isRequired
|
store: PropTypes.object
|
||||||
|
};
|
||||||
|
|
||||||
|
static propTypes = {
|
||||||
|
store: PropTypes.object
|
||||||
};
|
};
|
||||||
|
|
||||||
static instrument = () => enhancer;
|
static instrument = () => enhancer;
|
||||||
|
|
||||||
constructor(props, context) {
|
constructor(props, context) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
|
if (context.store) {
|
||||||
this.liftedStore = context.store.liftedStore;
|
this.liftedStore = context.store.liftedStore;
|
||||||
|
} else {
|
||||||
|
this.liftedStore = props.store.liftedStore;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user