React App 생성하는 법


  1. root 위치에서 다음의 명령어 입력

    npm create vite@latest
    
  2. 필요한 패키지를 설치하고 프로젝트명 생성

  3. React, JavaScript 선택

  4. 새로 생성한 emotion-diary를 vscode에서 폴더 열기로 열기

  5. 터미널(ctrl + j)에서 package.json 정보를 기반으로 라이브러리 설치

    npm install
    npm i
    
  6. eslint.config.js에 추가설정

            rules: {
            ...js.configs.recommended.rules,
            ...react.configs.recommended.rules,
            ...react.configs['jsx-runtime'].rules,
            ...reactHooks.configs.recommended.rules,
            'react/jsx-no-target-blank': 'off',
            'react-refresh/only-export-components': [
                    'warn',
                    { allowConstantExport: true },
                ],
                "no-unused-vars": "off",
                "react/prop-types": "off",
                "react-refresh/only-export-components":"off"
            },
    

React.js 개론


React.js 입문