redux-devtools
Advanced tools
Comparing version 3.0.0-alpha to 3.0.0-alpha-1
'use strict'; | ||
exports.__esModule = true; | ||
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; }; })(); | ||
exports['default'] = connectMonitor; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var _react = require('react'); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _reactRedux = require('react-redux'); | ||
@@ -11,7 +26,52 @@ | ||
function connectMonitor(Monitor) { | ||
return _reactRedux.connect(function (state) { | ||
var ConnectedMonitor = _reactRedux.connect(function (state) { | ||
return state; | ||
}, _devTools.ActionCreators)(Monitor); | ||
var DevTools = (function (_Component) { | ||
_inherits(DevTools, _Component); | ||
function DevTools() { | ||
_classCallCheck(this, DevTools); | ||
_Component.apply(this, arguments); | ||
} | ||
DevTools.prototype.render = function render() { | ||
var store = this.props.store; | ||
if (!store) { | ||
return null; | ||
} | ||
var devToolsStore = store.devToolsStore; | ||
if (!devToolsStore) { | ||
return null; | ||
} | ||
return _react2['default'].createElement(ConnectedMonitor, _extends({}, this.props, { store: devToolsStore })); | ||
}; | ||
_createClass(DevTools, null, [{ | ||
key: 'propTypes', | ||
value: { | ||
store: function store(props, propName, componentName) { | ||
if (!props.store) { | ||
return new Error('Required prop `store` was not specified in `' + componentName + '`.'); | ||
} | ||
if (!props.store.devToolsStore) { | ||
return new Error('Could not find the DevTools store inside the `store` prop passed to `' + componentName + '`. Have you applied the devTools() store enhancer?'); | ||
} | ||
} | ||
}, | ||
enumerable: true | ||
}]); | ||
return DevTools; | ||
})(_react.Component); | ||
return DevTools; | ||
} | ||
module.exports = exports['default']; |
{ | ||
"name": "redux-devtools", | ||
"version": "3.0.0-alpha", | ||
"version": "3.0.0-alpha-1", | ||
"description": "Redux DevTools with hot reloading and time travel", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
24817
390
0