react-component-maker-generator
v2.1.1
Published
build react-component kit
Downloads
7
Readme
Fork from react-component-maker
react-component-maker
the cli to create react components
v1.2.0
support css
,scss
,less
support
- the cli to create react components
- support create multiple components
- support
css
,Scss
,Less
- support stateless function(or you can say pure component)
Usage
npm i -g react-component-maker
mkreact App
//you will create React component named App
mkreact Header,Body,Footer
//you will create React compoennts named Header,Body,Footer
create component with Scss
mkreact -s Body
//create React components named Body with Scss
create React component with Less
mkreact -l Body
//create React components named Body with Less
create React component with Less
mkreact -p Body
//you will create pure component for stateless function
component details
- [name].jsx
- [name].css
- index.jsx
file details
[name].jsx
import React from 'react';
import styles from './[name].css'
class [name] extends React.Component {
constructor(props) {
super(props);
this.displayName = [name];
}
render() {
return (
<div className={styles.container}>
[name]
</div>
)
}
}
export default [name];
[name].css
.container {
}
index.jsx
import [name] from './hh'
export default [name]