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

React-Component-Template

iinnu

|
36 installs
| (0) | Free
Default react component file and code generator
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

react-component-generator

개요

  • 팀 내 리액트 컴포넌트 컨벤션에 따라서 쉽게 컴포넌트를 만들 수 있게 해주는 vscode extension

실행 방법

  1. 디렉토리에서 우클릭하여 Create react component를 선택
  2. 컴포넌트명 입력
  3. 파일 생성

실행 결과

  • 디렉토리 구조
SomeComponent
├── index.tsx
└── index.scss
  • 파일 내용
// index.tsx
import './index.scss';

function SomeComponent() {}

export default SomeComponent;

동작 방식

  1. 현재 디렉토리 이름이 컴포넌트 이름과 같은 경우
    • 현재 디렉토리가 비어있다면 파일 생성
  2. 현재 디렉토리에 컴포넌트 이름과 같은 디렉토리가 있는 경우
    • 해당 디렉토리가 비어있다면 파일 생성
  3. 현재 디렉토리에 컴포넌트 이름으로 된 디렉토리가 없는 경우
    • 디렉토리 및 파일 생성
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft