프로젝트를 통해 얻을 수 있는 React 기술들
초기 셋팅 법 :
①. 프로젝트 생성할 폴더 위치로 Vscode 접속 후, 터미널 창에 react 프로젝트 생성
npm create vite@latest
②. 명령어 후에 생성된 폴더로 vsCode 위치를 옮긴 뒤, 아래의 명령어를 통해, react 나머지 파일들 생성
npm i
③. [eslint.config.js]
파일 코드 내 ruls 수정
import js from "@eslint/js";
import globals from "globals";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
export default [
{ ignores: ["dist"] },
{
files: ["**/*.{js,jsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: "latest",
ecmaFeatures: { jsx: true },
sourceType: "module",
},
},
settings: { react: { version: "18.3" } },
plugins: {
react,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
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",
},
},
];
④. Router 설치
'팀프로젝트_기록일지 > React_이정환_감정일기장_프로젝트' 카테고리의 다른 글
(18).이정환_react.js강의_감정일기장_프로젝트_5강_기능구현설계, 일기 생성 ,수정 , 삭제의 useRuder, dispatch 작성, Context 생성(작성중) (0) | 2025.01.21 |
---|---|
(17).이정환_react.js강의_감정일기장_프로젝트_4강_공통 컴포넌트 구현하기(작성중) (0) | 2025.01.20 |
(16).이정환_react.js강의_감정일기장_프로젝트_3강_폰트,이미지,레이아웃 설정 (0) | 2025.01.20 |
(15).이정환_react.js강의_감정일기장_프로젝트_2강_Link태그 (0) | 2025.01.20 |
(14).이정환_react.js강의_감정일기장_프로젝트_1강_페이지라우팅(작성중) (1) | 2025.01.20 |