Create an initial '.js' file for reactjs component.
$ npm install react-new-component -g
$ 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 = {
}
Options:
-h, --help output usage information
-V, --version output the version number
-s, --semicolon use semicolon in file