1.0.1 • Published 5 years ago

@wicstily/create-react-component v1.0.1

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

What is this for?

Create React js components with ease

Installation

In React js project's root npm i node-sass

npm i -g create-react-component

Usage

create-react-component type[f / d || c / s || container ] name [types / false] [default / false]

  • f / d - generating a functional / dumb component
  • c / s - generating a class / smart component
  • container - generating a Container component for this file structure, witch is gonna be rendered by React renderer alternatively to App component !!! DOES NOT USE LAST THREE OPTIONS WITH THIS
  • name - specify a name for a component
  • types - add propTypes to a component ! optional
  • default - add defaultProps to a component ! optional

Generated file structure and files

  src
  |_components
    |_ComponentName
      |_ComponentName.jsx
      |_ComponentName.scss
  |_Container.jsx