redux-devtools
Advanced tools
Comparing version 0.1.3 to 0.2.0
@@ -5,4 +5,2 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
@@ -24,4 +22,2 @@ | ||
var _redux = require('redux'); | ||
var _devTools = require('./devTools'); | ||
@@ -36,8 +32,30 @@ | ||
var Provider = _createAll.Provider; | ||
var Connector = _createAll.Connector; | ||
var connect = _createAll.connect; | ||
return (function (_Component) { | ||
var DevTools = (function (_Component) { | ||
_inherits(DevTools, _Component); | ||
_createClass(DevTools, null, [{ | ||
function DevTools() { | ||
_classCallCheck(this, _DevTools); | ||
_Component.apply(this, arguments); | ||
} | ||
DevTools.prototype.render = function render() { | ||
var Monitor = this.props.monitor; | ||
return React.createElement(Monitor, this.props); | ||
}; | ||
var _DevTools = DevTools; | ||
DevTools = connect(function (state) { | ||
return state; | ||
}, _devTools.ActionCreators)(DevTools) || DevTools; | ||
return DevTools; | ||
})(Component); | ||
return (function (_Component2) { | ||
_inherits(DevToolsWrapper, _Component2); | ||
_createClass(DevToolsWrapper, null, [{ | ||
key: 'propTypes', | ||
@@ -55,35 +73,13 @@ value: { | ||
function DevTools(props, context) { | ||
var _this = this; | ||
function DevToolsWrapper(props, context) { | ||
_classCallCheck(this, DevToolsWrapper); | ||
_classCallCheck(this, DevTools); | ||
if (props.store && !props.store.devToolsStore) { | ||
console.error('Could not find the devTools store inside your store. ' + 'Have you applied devTools() higher-order store?'); | ||
} | ||
_Component.call(this, props, context); | ||
this.renderRoot = function () { | ||
return React.createElement( | ||
Connector, | ||
null, | ||
_this.renderMonitor | ||
); | ||
}; | ||
this.renderMonitor = function (_ref) { | ||
var dispatch = _ref.dispatch; | ||
var state = _objectWithoutProperties(_ref, ['dispatch']); | ||
var _props = _this.props; | ||
var Monitor = _props.monitor; | ||
var rest = _objectWithoutProperties(_props, ['monitor']); | ||
return React.createElement(Monitor, _extends({}, state, _redux.bindActionCreators(_devTools.ActionCreators, dispatch), rest)); | ||
}; | ||
_Component2.call(this, props, context); | ||
this.renderDevTools = this.renderDevTools.bind(this); | ||
} | ||
DevTools.prototype.render = function render() { | ||
DevToolsWrapper.prototype.render = function render() { | ||
var devToolsStore = this.props.store.devToolsStore; | ||
@@ -94,7 +90,16 @@ | ||
{ store: devToolsStore }, | ||
this.renderRoot | ||
this.renderDevTools | ||
); | ||
}; | ||
return DevTools; | ||
DevToolsWrapper.prototype.renderDevTools = function renderDevTools() { | ||
var _props = this.props; | ||
var store = _props.store; | ||
var rest = _objectWithoutProperties(_props, ['store']); | ||
return React.createElement(DevTools, rest); | ||
}; | ||
return DevToolsWrapper; | ||
})(Component); | ||
@@ -101,0 +106,0 @@ } |
{ | ||
"name": "redux-devtools", | ||
"version": "0.1.3", | ||
"version": "0.2.0", | ||
"description": "Redux DevTools with hot reloading and time travel", | ||
@@ -50,5 +50,5 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"react-redux": "^0.2.2", | ||
"react-redux": "^0.5.0", | ||
"redux": "^1.0.0-rc" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
761
36021
+ Addedreact-redux@0.5.3(transitive)
- Removedreact-redux@0.2.2(transitive)
Updatedreact-redux@^0.5.0