Socket
Socket
Sign inDemoInstall

redux-devtools

Package Overview
Dependencies
9
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.3 to 3.0.0-alpha

lib/connectMonitor.js

7

lib/devTools.js

@@ -211,2 +211,3 @@ 'use strict';

function unliftStore(liftedStore, reducer) {
var lastDefinedState = undefined;
return _extends({}, liftedStore, {

@@ -219,3 +220,7 @@ devToolsStore: liftedStore,

getState: function getState() {
return unliftState(liftedStore.getState());
var state = unliftState(liftedStore.getState());
if (state !== undefined) {
lastDefinedState = state;
}
return lastDefinedState;
},

@@ -222,0 +227,0 @@ getReducer: function getReducer() {

@@ -13,2 +13,6 @@ 'use strict';

exports.persistState = _interopRequire(_persistState);
exports.persistState = _interopRequire(_persistState);
var _connectMonitor = require('./connectMonitor');
exports.connectMonitor = _interopRequire(_connectMonitor);

4

package.json
{
"name": "redux-devtools",
"version": "2.1.3",
"version": "3.0.0-alpha",
"description": "Redux DevTools with hot reloading and time travel",

@@ -56,4 +56,2 @@ "main": "lib/index.js",

"dependencies": {
"react-json-tree": "^0.1.9",
"react-mixin": "^1.7.0",
"react-redux": "^3.0.0",

@@ -60,0 +58,0 @@ "redux": "^2.0.0 || ^3.0.0"

@@ -16,5 +16,3 @@ Redux DevTools

* With `persistState()` store enhancer, you can persist debug sessions across page reloads
* 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
* To hide the devtools on load, set `visibleOnLoad` to false, e.g.: `<DevTools store={store} monitor={LogMonitor} visibleOnLoad={false} />`

@@ -34,6 +32,8 @@ ### Installation

import { compose, createStore, applyMiddleware } from 'redux';
// Redux DevTools store enhancers
import { devTools, persistState } from 'redux-devtools';
// React components for Redux DevTools
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
// A monitor component for Redux DevTools
import LogMonitor from 'redux-devtools-log-monitor';
```

@@ -47,4 +47,6 @@

applyMiddleware(m1, m2, m3), // any Redux middleware, e.g. redux-thunk
// Provides support for DevTools:
devTools(),
// Lets you write ?debug_session=<name> in address bar to persist debug sessions

@@ -57,3 +59,3 @@ persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/))

Finally, include the `DevTools` in your page. You may pass either `LogMonitor` (the default one) or any of the custom monitors described below. For convenience, you can use `DebugPanel` to dock `DevTools` to some part of the screen, but you can put it also somewhere else in the component tree.
Finally, include the `DevTools` in your page. You may pass either `LogMonitor` (the default one) or any of the custom monitors described below.

@@ -66,7 +68,6 @@ ```js

<Provider store={store}>
{() => <CounterApp />}
<CounterApp />
</Provider>
<DebugPanel top right bottom>
<DevTools store={store} monitor={LogMonitor} />
</DebugPanel>
<LogMonitor store={store.devToolsStore} />
</div>

@@ -73,0 +74,0 @@ );

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc