A command-line interface (CLI) tool to quickly generate React components with optional TypeScript support and CSS styles.
npm install create-new-react-component --save-dev
create-new-react-component <componentName> [options]
- --withStyles: Create a CSS file for the component
- --lang <style>: Choose the file style (js or ts), default is js
# Create a JavaScript component without styles
create-new-react-component MyComponent
# Create a JavaScript component with styles
create-new-react-component MyComponent --withStyles
# Create a TypeScript component without styles
create-new-react-component MyComponent --lang ts
# Create a TypeScript component with styles
create-new-react-component MyComponent --withStyles --lang ts