-
Notifications
You must be signed in to change notification settings - Fork 10
[2주차] 정성훈 과제 제출합니다. #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,69 +1,3 @@ | ||
| # 2주차 과제: React Todo | ||
| # 서론 | ||
| 투두리스트를 만들었습니다! | ||
|
|
||
| 안녕하세요 🙌🏻 22기 프론트엔드 운영진 **권동욱**입니다. | ||
|
|
||
| 다들 1주차 미션 Vanilla Todo 만드시느라 수고 많으셨습니다! 1주차 미션을 통해 여러분들께서 본격적인 React 사용에 앞서 Vanilla JS로 SPA를 만들때의 불편한 점을 느끼셨을 것 이라 생각합니다. | ||
|
|
||
| 그리하여 이번 미션은, 1주차 스터디 미션으로 주어진 Todo list 만들기를 **React**로 리팩토링하는 것 입니다! | ||
| 기존에 리액트를 잘 아시던 분들께는, 조금 더 효울적인 디자인 패턴에 대해 고민할수 있는 주차가 될 것이고, 리액트를 제대로 접해보지 못하신 분들께는 기존의 어플리케이션을 리액트로 포팅하는 과정을 통해 왜 프론트엔드 시장에 리액트가 등장하게 되었고, 리액트에서 사용하는 여러가지 방식들이 왜 바닐라에 비해 효율적인지 꺠닫는 주차가 될 것이라 생각합니다. | ||
|
|
||
| 비교적 가벼운 미션인 만큼 코드를 짜는 데 있어 여러분의 **창의성**을 충분히 발휘해보시기 바랍니다. _❕작동하기만 하면 되는 것보다 같은 코드를 짜는 여러가지 방식과 패턴에 대해 많이 고민해보시고, 본인이 작성할 수 있는 가장 창의적인 방법으로 코드를 작성해주셨으면 합니다.❕_ 여러분이 미션 수행을 하는 과정에서 한 생각과 고민만큼 스터디에서 더 많은 것을 얻어가실 수 있을 거라 기대합니다! | ||
|
|
||
| 또한, React 프로젝트를 생성하는 데 있어서 **Vite활용**이 필수입니다! 이유는 기존에 React 프로젝트를 생성하는 방법중 하나인 **Create React App**가 25년에 공식적으로 더 이상 지원되지 않는다고 발표했습니다. 그리고 추가적으로 공식문서에서도 Vite로 프로젝트를 생성하는 것을 권장하고 있고, 과제를 진행하면서 Vite를 활용한 프로젝트 환경 세팅과 Build Tool, 번들링 등의 지식을 습득하는 경험이 도움이 될 것이라 생각됩니다. | ||
|
|
||
| 막히는 부분이 있더라도 우선 스스로 공부하고 찾아보면서 미션을 진행하는 방식을 권고드리지만, 미션과 관련하여 운영진의 도움이 필요하시다면 얼마든지 슬랙 Q&A 채널이나 프론트엔드 카톡방, 멘토에게 질문을 남겨 주세요! | ||
|
|
||
| # 미션 | ||
|
|
||
| ## 예시 | ||
|
|
||
| - [리액트 투두 예시](https://react-todo-21th-snowy.vercel.app/) | ||
|
|
||
| ## 미션 목표 | ||
|
|
||
| - VSCode, Prettier를 이용하여 개발환경을 관리합니다. | ||
| - React의 기초를 이해합니다. | ||
| - React를 통한 어플리케이션 상태 관리 방법을 이해합니다. | ||
| - React Hooks에 대한 기초를 이해합니다. | ||
| - Vite를 통한 React 프로젝트 개발환경 구축을 익힙니다. | ||
| - Styled-Components를 통한 CSS-in-JS 및 CSS Preprocessor의 사용법을 익힙니다. | ||
|
|
||
| ## 기한 | ||
|
|
||
| - 2025년 9월 20일 토요일 23:59까지 | ||
|
|
||
| ## Review Questions | ||
|
|
||
| - Virtual-DOM은 무엇이고, 이를 사용함으로서 얻는 이점은 무엇인가요? | ||
| - React.memo(), useMemo(), useCallback() 함수로 진행할 수 있는 리액트 렌더링 최적화에 대해 설명해주세요. 다른 방식이 있다면 이에 대한 소개도 좋습니다. | ||
| - React 컴포넌트 생명주기에 대해서 설명해주세요. | ||
|
|
||
| ## 필수 요건 | ||
| - 1주차 미션의 결과물을 그대로 React로 구현합니다. (‼️ todo / done 개수 잊지 마세요 ‼️) | ||
| - Styled-Component를 사용합니다. | ||
| - React Hooks만을 사용해 상태를 관리합니다.(전역 상태관리 라이브러리 사용 XX) | ||
| - Vite를 활용하여 React 프로젝트 환경 구축을 진행합니다 | ||
|
|
||
| ## 선택 요건 | ||
|
|
||
| - 기존 Todo-list에 여러분들이 추가하고 싶은 기능과 디자인을 자유롭게 추가해보세요. | ||
| - TypeScript를 활용하여 프로젝트를 진행해보세요. | ||
|
|
||
| ## 로컬 실행방법 | ||
|
|
||
| `npm start` : 로컬에서 react application을 자동으로 리로드하여 실행시켜줍니다. | ||
|
|
||
| # 링크 및 참고자료 | ||
|
|
||
| - [create react app (CRA)](https://create-react-app.dev/docs/getting-started/) | ||
| - [리액트 docs 주요 개념 1-12](https://react.dev/learn) | ||
| - [리액트 docs Hook 1-3](https://react.dev/reference/react) | ||
| - [리액트 useEffect 완벽 가이드](https://overreacted.io/ko/a-complete-guide-to-useeffect/) | ||
| - [컴포넌트 네이밍을 위한 자바스크립트 네이밍 컨벤션](https://velog.io/@cada/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8-%EC%8A%A4%ED%83%80%EC%9D%BC-%EA%B0%80%EC%9D%B4%EB%93%9C-%EB%84%A4%EC%9D%B4%EB%B0%8D-%EC%BB%A8%EB%B2%A4%EC%85%98-%ED%8E%B8) | ||
| - [useState, useEffect hooks](https://velog.io/@velopert/react-hooks#1-usestate) | ||
| - [styled-component](https://styled-components.com/docs/basics#getting-started) | ||
| - [create react app (CRA) 지원종료 공식문서](https://react.dev/blog/2025/02/14/sunsetting-create-react-app) | ||
| - [create react app 지원종료관련 okky 커뮤니티 게시글](https://okky.kr/articles/1527414) | ||
| - [cra 대신에 vite로 React 프로젝트 시작하기](https://www.daleseo.com/vite-react/) | ||
| - [Vite 실무 적용기 - 설명 + 프로젝트 설정](https://blog.hectodata.co.kr/bonjour-vite/) | ||
| 9/20 정성훈 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
| lerna-debug.log* | ||
|
|
||
| node_modules | ||
| dist | ||
| dist-ssr | ||
| *.local | ||
|
|
||
| # Editor directories and files | ||
| .vscode/* | ||
| !.vscode/extensions.json | ||
| .idea | ||
| .DS_Store | ||
| *.suo | ||
| *.ntvs* | ||
| *.njsproj | ||
| *.sln | ||
| *.sw? |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 다음 과제 하실 때는 react 환경 구축하실 때 현재 폴더 기준으로 하실지, 이렇게 새로운 폴더를 만드실지 고려해보시는 것도 좋을 거 같아요 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # React + TypeScript + Vite | ||
|
|
||
| This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
|
|
||
| Currently, two official plugins are available: | ||
|
|
||
| - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
| - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh | ||
|
|
||
| ## Expanding the ESLint configuration | ||
|
|
||
| If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: | ||
|
|
||
| ```js | ||
| export default tseslint.config([ | ||
| globalIgnores(['dist']), | ||
| { | ||
| files: ['**/*.{ts,tsx}'], | ||
| extends: [ | ||
| // Other configs... | ||
|
|
||
| // Remove tseslint.configs.recommended and replace with this | ||
| ...tseslint.configs.recommendedTypeChecked, | ||
| // Alternatively, use this for stricter rules | ||
| ...tseslint.configs.strictTypeChecked, | ||
| // Optionally, add this for stylistic rules | ||
| ...tseslint.configs.stylisticTypeChecked, | ||
|
|
||
| // Other configs... | ||
| ], | ||
| languageOptions: { | ||
| parserOptions: { | ||
| project: ['./tsconfig.node.json', './tsconfig.app.json'], | ||
| tsconfigRootDir: import.meta.dirname, | ||
| }, | ||
| // other options... | ||
| }, | ||
| }, | ||
| ]) | ||
| ``` | ||
|
|
||
| You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: | ||
|
|
||
| ```js | ||
| // eslint.config.js | ||
| import reactX from 'eslint-plugin-react-x' | ||
| import reactDom from 'eslint-plugin-react-dom' | ||
|
|
||
| export default tseslint.config([ | ||
| globalIgnores(['dist']), | ||
| { | ||
| files: ['**/*.{ts,tsx}'], | ||
| extends: [ | ||
| // Other configs... | ||
| // Enable lint rules for React | ||
| reactX.configs['recommended-typescript'], | ||
| // Enable lint rules for React DOM | ||
| reactDom.configs.recommended, | ||
| ], | ||
| languageOptions: { | ||
| parserOptions: { | ||
| project: ['./tsconfig.node.json', './tsconfig.app.json'], | ||
| tsconfigRootDir: import.meta.dirname, | ||
| }, | ||
| // other options... | ||
| }, | ||
| }, | ||
| ]) | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import js from '@eslint/js' | ||
| import globals from 'globals' | ||
| import reactHooks from 'eslint-plugin-react-hooks' | ||
| import reactRefresh from 'eslint-plugin-react-refresh' | ||
| import tseslint from 'typescript-eslint' | ||
| import { globalIgnores } from 'eslint/config' | ||
|
|
||
| export default tseslint.config([ | ||
| globalIgnores(['dist']), | ||
| { | ||
| files: ['**/*.{ts,tsx}'], | ||
| extends: [ | ||
| js.configs.recommended, | ||
| tseslint.configs.recommended, | ||
| reactHooks.configs['recommended-latest'], | ||
| reactRefresh.configs.vite, | ||
| ], | ||
| languageOptions: { | ||
| ecmaVersion: 2020, | ||
| globals: globals.browser, | ||
| }, | ||
| }, | ||
| ]) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 프로젝트가 포커싱하고 있는 나라, 주로 사용하는 언어 등 다양한 요소를 고려할 수 있습니다. 추후 프로젝트에서는 대한민국 타겟을 할 확률이 높기 때문에 |
||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <link rel="icon" type="image/png" href="/favicon2.png" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>투두리스트</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| </body> | ||
| </html> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readme 작성해 주신 거 좋은 것 같아요. 다음 과제에는 조금 더 많은 내용을 작성해보아도 좋을 거 같아요