mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-01-31 11:51:41 +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 {
|
||||
static contextTypes = {
|
||||
store: PropTypes.object.isRequired
|
||||
store: PropTypes.object
|
||||
};
|
||||
|
||||
static propTypes = {
|
||||
store: PropTypes.object
|
||||
};
|
||||
|
||||
static instrument = () => enhancer;
|
||||
|
||||
constructor(props, context) {
|
||||
super(props, context);
|
||||
this.liftedStore = context.store.liftedStore;
|
||||
if (context.store) {
|
||||
this.liftedStore = context.store.liftedStore;
|
||||
} else {
|
||||
this.liftedStore = props.store.liftedStore;
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user