Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>React Component GeneratorNew to Visual Studio Code? Get it now.

React Component Generator

Roberth González

|
36 installs
| (1) | Free
Generates files for new React components
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Marketplace Github Twitter buymeacoffee

React Component Generator

Generate React components:

  • src
    • /components
      • /NewComponent
        • index.ts|.js
        • NewComponent.css|.scss|.module.css|.module.scss
        • NewComponent.ts|.js
        • /tests
          • NewComponent.test.ts|.js

Features

Right click in the file editor or on a file in the explorer and click Generate React component to scaffold out a new React component with all the files you need.

Settings

Name Description Default
reactComponentGenerator.language Specifies if components should be generated in TypeScript or JavaScript. ts
reactComponentGenerator.stylesLanguage Specifies what language will be used for styles. scss
reactComponentGenerator.useIndexFile Specifies if the components folder should have an index file to export all of its components. true
reactComponentGenerator.createTestsFile Specifies if the components should have test files. false
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft