
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
generator-redux-component
Advanced tools
Yeoman generator for React-Redux component. The code is written using ES7, so you need Babel for polyfill.
$ npm install -g generator-redux-component
Run generator
yo redux-component
Choose component type (Smart or Dump)
Reducers use Imutabale.js for state. I also use createReducers
function for reduce boilerplate code.
import Immutable, { Map, List } from 'immutable';
export default function createReducer(initialState, handlers) {
return (state = initialState, action) => {
let newState = state;
if (!Map.isMap(state) && !List.isList(state)) {
newState = Immutable.fromJS(state);
}
const handler = handlers[action.type];
if (!handler) {
return newState;
}
newState = handler(newState, action);
if (!Map.isMap(newState) && !List.isList(newState)) {
throw new TypeError('Reducers must return Immutable objects.');
}
return newState;
};
}
Don't forget to import generated reducer for createStore
function!
The dump component use BEM by default. You can find createBEM
function here
FAQs
React-Redux generator for app with feature folders
The npm package generator-redux-component receives a total of 0 weekly downloads. As such, generator-redux-component popularity was classified as not popular.
We found that generator-redux-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.