react-new-component

1.0.6 • Public • Published

react-new-component

Create an initial '.js' file for reactjs component.

NPM Version NPM Downloads

Installation

$ npm install react-new-component -g

Usage

$ new-comp App

Then, you should get 'App.js' in your project root directory and it looks like this!

import React, { Component } from 'react'

export default class App extends Component {

    constructor(props) {
        super()
        this.state = {

        }
    }

    componentDidMount() {

    }

    render() {
        return(
            <div>
                this is a new component!
            </div>
        )
    }
}

const styles = {

}

Command Line Options

  Options:
    -h, --help       output usage information
    -V, --version    output the version number
    -s, --semicolon  use semicolon in file

License

MIT

/react-new-component/

    Package Sidebar

    Install

    npm i react-new-component

    Weekly Downloads

    4

    Version

    1.0.6

    License

    MIT

    Last publish

    Collaborators

    • believeitcould