redux-devtools
Advanced tools
Comparing version 1.1.2 to 2.0.0
# Change log | ||
All notable changes to this project will be documented in this file. | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
See all notable changes on [Releases](https://github.com/gaearon/redux-devtools/releases) page. |
@@ -5,2 +5,4 @@ '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; }; })(); | ||
@@ -12,7 +14,5 @@ | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
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) subClass.__proto__ = superClass; } | ||
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; } | ||
@@ -31,3 +31,2 @@ var _reactReduxLibComponentsCreateAll = require('react-redux/lib/components/createAll'); | ||
var Provider = _createAll.Provider; | ||
var connect = _createAll.connect; | ||
@@ -77,27 +76,12 @@ | ||
if (props.store && !props.store.devToolsStore) { | ||
console.error('Could not find the devTools store inside your store. ' + 'Have you applied devTools() higher-order store?'); | ||
console.error('Could not find the devTools store inside your store. ' + 'Have you applied devTools() store enhancer?'); | ||
} | ||
_Component2.call(this, props, context); | ||
this.renderDevTools = this.renderDevTools.bind(this); | ||
} | ||
DevToolsWrapper.prototype.render = function render() { | ||
var devToolsStore = this.props.store.devToolsStore; | ||
return React.createElement( | ||
Provider, | ||
{ store: devToolsStore }, | ||
this.renderDevTools | ||
); | ||
return React.createElement(DevTools, _extends({}, this.props, { | ||
store: this.props.store.devToolsStore })); | ||
}; | ||
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; | ||
@@ -104,0 +88,0 @@ })(Component); |
@@ -11,3 +11,3 @@ 'use strict'; | ||
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) subClass.__proto__ = superClass; } | ||
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; } | ||
@@ -14,0 +14,0 @@ var _react = require('react'); |
@@ -13,3 +13,3 @@ 'use strict'; | ||
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) subClass.__proto__ = superClass; } | ||
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; } | ||
@@ -16,0 +16,0 @@ var _react = require('react'); |
{ | ||
"name": "redux-devtools", | ||
"version": "1.1.2", | ||
"version": "2.0.0", | ||
"description": "Redux DevTools with hot reloading and time travel", | ||
@@ -47,3 +47,3 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"redux": "^1.0.0 || 1.0.0-rc" | ||
"redux": "^2.0.0" | ||
}, | ||
@@ -53,5 +53,5 @@ "dependencies": { | ||
"react-mixin": "^1.7.0", | ||
"react-redux": "^0.9.0", | ||
"redux": "^1.0.1" | ||
"react-redux": "^2.0.0", | ||
"redux": "^2.0.0" | ||
} | ||
} |
@@ -17,2 +17,3 @@ Redux DevTools | ||
* To monitor a part of the state, you can set a `select` prop on the DevTools component: `<DevTools select={state => state.todos} store={store} monitor={LogMonitor} />` | ||
* Toggle visibility with Ctrl+H | ||
@@ -47,5 +48,4 @@ ### Installation | ||
// Lets you write ?debug_session=<name> in address bar to persist debug sessions | ||
persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)), | ||
createStore | ||
); | ||
persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)) | ||
)(createStore); | ||
@@ -74,5 +74,5 @@ const store = finalCreateStore(reducer); | ||
[This commit](https://github.com/gaearon/redux-devtools/commit/0a2a97556e252bfad822ca438923774bc8b932a4) should give you an idea about how to add Redux DevTools for your app **but make sure to only apply `devTools()` in development!** In production, this will be terribly slow because actions just accumulate forever. (We'll need to implement a rolling window for dev too.) | ||
**Make sure to only apply `devTools()` in development!** In production, this will be terribly slow because actions just accumulate forever. (We'll need to implement a rolling window for dev too.) | ||
For example, in Webpack, you can use `DefinePlugin` to turn magic constants like `__DEV__` into `true` or `false` depending on the environment, and import and render `redux-devtools` conditionally behind `if (__DEV__)`. Then, if you have an Uglify step before production, Uglify will eliminate dead `if (false)` branches with `redux-devtools` imports. Here is [an example](https://github.com/erikras/react-redux-universal-hot-example/compare/66bf63fb0f23a3c264a5d37c3acb4c047bf0c0c9...c6515236a1def8a3d2bfeb8f6cd6f0ccdb2f9e1b) of adding React DevTools to a project handling the production case correctly. | ||
For example, in Webpack, you can use `DefinePlugin` to turn magic constants like `__DEV__` into `true` or `false` depending on the environment, and import and render `redux-devtools` conditionally behind `if (__DEV__)`. Then, if you have an Uglify step before production, Uglify will eliminate dead `if (false)` branches with `redux-devtools` imports. Here is [an example](https://github.com/erikras/react-redux-universal-hot-example/) that adds Redux DevTools handling the production case correctly. | ||
@@ -79,0 +79,0 @@ ### Running Examples |
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
70581
1840
+ Addedreact-redux@2.1.2(transitive)
+ Addedredux@2.0.0(transitive)
- Removedreact-redux@0.9.0(transitive)
- Removedredux@1.0.1(transitive)
Updatedreact-redux@^2.0.0
Updatedredux@^2.0.0