Tired of duplicating that old base component for creating a new one? React Scaffolding helps you to Scaffold various types of React Components quickly
Just run
npx react-scaffolding --name=yourComponentName --option=[function|class|pure]Or
npm install -g react-scaffolding
With React Scaffolding you can create the following types of React Components:
- Function
- Class extending PureComponent
- Class extending Component
$ react-scaffolding --name=my-component --option=functionWill create a folder named my-component with the following files:
my-component.js
import React from 'react'
import './mycomponent.css'
const MyComponent = (props) => (
<div></div>
)
export default MyComponentmy-component.css
.my-component { }--name: string (required) Your component name
--option: function | class | pureComponent (required) The template that will be used for create your component
--path: string (optional) The path that the component will be placed.
MIT ©