Gathering detailed insights and metrics for electron-redux-devtools
Gathering detailed insights and metrics for electron-redux-devtools
Gathering detailed insights and metrics for electron-redux-devtools
Gathering detailed insights and metrics for electron-redux-devtools
npm install electron-redux-devtools
60
Supply Chain
98.3
Quality
75.3
Maintenance
100
Vulnerability
99.3
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
5 Stars
9 Commits
1 Forks
2 Watching
1 Branches
2 Contributors
Updated on 07 Apr 2021
JavaScript (52.28%)
HTML (47.72%)
Cumulative downloads
Total Downloads
Last day
-50%
7
Compared to previous day
Last week
-83.4%
53
Compared to previous week
Last month
-6.5%
1,287
Compared to previous month
Last year
4.6%
9,880
Compared to previous year
1
53
Simple installing and using Redux DevTools Extension on Electron
1npm install --save-dev electron-redux-devtools 2or 3npm install --save-dev firejune/electron-redux-devtools
Then execute the following from the Console tab of your running Electron app's developer tools:
1require('electron-redux-devtools').install()
And than refresh or restart the renderer process, you can see a Redux
tab added.
For a basic Redux store simply add:
1 const store = createStore( 2 reducer, /* preloadedState, */ 3+ window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() 4 );
Note that preloadedState
argument is optional in Redux' createStore
.
For universal ("isomorphic") apps, prefix it with
typeof window !== 'undefined' &&
.
In case ESLint is configured to not allow using the underscore dangle, wrap it like so:
1+ /* eslint-disable no-underscore-dangle */ 2 const store = createStore( 3 reducer, /* preloadedState, */ 4 window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() 5 ); 6+ /* eslint-enable */
You don't need to npm install
redux-devtools
when using the extension (that's a different lib).
If you setup your store with middleware and enhancers, change:
1 import { createStore, applyMiddleware, compose } from 'redux'; 2 3+ const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; 4+ const store = createStore(reducer, /* preloadedState, */ composeEnhancers( 5- const store = createStore(reducer, /* preloadedState, */ compose( 6 applyMiddleware(...middleware) 7 ));
Note that when the extension is not installed, we’re using Redux compose here.
To specify extension’s options, use it like so:
1const composeEnhancers =
2 typeof window === 'object' &&
3 window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?
4 window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
5 // Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize...
6 }) : compose;
7
8const enhancer = composeEnhancers(
9 applyMiddleware(...middleware),
10 // other store enhancers if any
11);
12const store = createStore(reducer, enhancer);
redux-devtools-extension
To use like so:
1import { createStore, applyMiddleware } from 'redux'; 2import { composeWithDevTools } from 'electron-redux-devtools'; 3 4const store = createStore(reducer, composeWithDevTools( 5 applyMiddleware(...middleware), 6 // other store enhancers if any 7));
To specify extension’s options:
1import { createStore, applyMiddleware } from 'redux';
2import { composeWithDevTools } from 'electron-redux-devtools';
3
4const composeEnhancers = composeWithDevTools({
5 // Specify name here, actionsBlacklist, actionsCreators and other options if needed
6});
7const store = createStore(reducer, /* preloadedState, */ composeEnhancers(
8 applyMiddleware(...middleware),
9 // other store enhancers if any
10));
In case you don't include other enhancers and middlewares, just use devToolsEnhancer
:
1import { createStore } from 'redux';
2import { devToolsEnhancer } from 'electron-redux-devtools';
3
4const store = createStore(reducer, /* preloadedState, */ devToolsEnhancer(
5 // Specify name here, actionsBlacklist, actionsCreators and other options if needed
6));
No vulnerabilities found.
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
Found 1/8 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More