Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Create React componentNew to Visual Studio Code? Get it now.
Create React component

Create React component

Escalion

|
957 installs
| (0) | Free
Create React component with index.js and CSS
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Create React component

Create React component in chosen in explorer path or default directory

New component include (can configurate):

  • path \ {componentName} \ {componentName}.js (React file with import {componentName}.css)
  • path \ {componentName} \ index.js (React with import {componentName}.js)
  • path \ {componentName} \ {componentName}.css (empty file)

To use component you just need to type like this:

import {ComponentName} from './path/{componentName}';

Default config looks like this:

{
	"defaultDir": "src/components",
	"componentType": "class",
	"openAfterCreate": true,
	"addCSS": true,
	"addConstructor": false,
	"language": "en",
	"componentNameStyle": {
		"styleInExplorer": "camel",
		"bigFirstLetterInExplorer": false,
		"styleInCode": "camel",
		"bigFirstLetterInCode": true
	}
}

Component styles can be:

Style bigFirstLetter = true bigFirstLetter = false
camel ReactComponentName reactComponentName
snake React_component_name react_component_name
kebab React-component-name react-component-name
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft