(ts-react-generator)
The extension automatically creates folder for react component containing:
index.ts
component.tsx
styles.ts
(forstyled
-component oremotion
option)container.ts
(for Redux)
Install through VS Code extensions. Search for VSCode React Component Generator for TypeScript
Visual Studio Code Market Place: VSCode React Component Generator
Can also be installed in VS Code: Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
ext install wiedymi.ts-react-generator
- Right click on the file or folder in the file explorer
- Select one of following options:
- "New Class component"
- "New Class component with Redux"
- "New Functional component"
- "New Functional component with Redux"
- Enter a component name in the pop up in camelCase or PascalCase. If you enter the component name as in camelCase, then extension will convert it PascalCase automatically.