1.0.10 • Published 5 years ago

moaiii-react-create-component v1.0.10

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

React Create Component Example module created automatically

A global cli tool for creating modular react components. Inspired by ng-generate for Angluar.

Purpose

This tool helps developers structure their react applications by feature. This is converse to structuring your app by type. More on this in the React docs here https://reactjs.org/docs/faq-structure.html

Structuring your application by feature allows you to create modular components which can be easily ported to other projects. Structuring by type, i.e. all your reducers in one folder, makes this portability more difficult.

Creating modular react components requires a lot of boilerplate code. This tool looks to create that boilerplate rapidly and allow the developer to focus on what matters, writting component logic!

Considerations

Currently the tool assumes you store your components at held in the folder ./src/ui

Useage

Install $npm i -g moaiii-react-create-component

Once installed globally you have access to the CLI command $rcr.

An example command would be $rcr --view --ExampleComp --stateful --redux

ArgumentWhatExample
1Where to put the new component--view
2Component name--ExampleName
3React component typeeither --stateful or --stateless
4Flag to connect component to redux with action, middleware and reducer filesblank or --redux

Output

$rcr --view --ExampleComp --stateful --redux

Creates the following files in ./src/ui/views

Example module created automatically

$rcr --forms --AnotherExample --stateless

Creates the following files in ./src/ui/views

Example module created automatically

1.0.10

5 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago