generate-react-redux-cli
v1.0.7
Published
A simple CLI to generate react components and create redux store, actions, and reducers
Maintainers
Readme
Generate-React-Redux-Cli
A simple CLI to generate react components and create redux store, actions, and reducers
Install
npm i -g generate-react-redux-cliUsage
Note: create reducer before creating store.
| Flags | Description | Value Type | | ----- | :---------------------: | :--------------: | | c | to create component | | | r | to create a reducer | | | s | to create a redux store | | | a | to create an action | | | -p | to specify a path | | | -t | type of a component | functional/class |
To create a component
generate-react-redux c ExampleExample of the component files structure
|-- /src
|-- /components
|-- /Example.jsx
To create a reducer
generate-react-redux e ExampleReducerExample of the component files structure
|-- /src
|-- /reducers
|-- /ExampleReducer.js
|-- /rootReducer.js
To create a store
generate-react-redux sExample of the component files structure
|-- /src
|-- /store
|-- /index.js
To create an action
generate-react-redux a ExampleActionExample of the component files structure
|-- /src
|-- /actions
|-- /ExampleAction.js
Options
path e.g src/components
generate-react-redux c Example -p src/pages/componentsExample of the component files structure
|-- /src
|-- /pages
|-- /components
|-- /Example.jsx
generate-react-redux c Example -p src/pages/componentsExample of the component
generate-react-redux c Example -p src/pages/components -t class