Conversation
jjuchan
reviewed
Jul 11, 2025
|
|
||
| function App() { | ||
| //초기 상태 | ||
| const initTodos = [ |
There was a problem hiding this comment.
이 초기 상태 부분은 나중에 유지 보수나 수정을 위해서 분리 하는게 좋아보입니다!!
|
|
||
| //상태 및 관련 함수 가져오기 | ||
| const { todos, addTodo, resetTodos, deleteTodo, toggleTodo, editTodo } = | ||
| useTodos(initTodos); |
There was a problem hiding this comment.
resetTodos만 복수형으로 변수명을 지으신 특별한 이유가 있나요?? 단순 궁금증입니다
Author
There was a problem hiding this comment.
추가/수정/삭제는 하나씩 이뤄지지만 리셋은 통으로 날라가는 느낌이라 그렇게 했습니다 ㅎㅎ..
|
코드 잘 봤습니다! 수고하셨습니다. |
|
코드 잘 봤습니다. 배울 점이 많네요! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✅ React TodoApp
📁 주요 기능 요약
🗂️ 폴더 구조 설명
🔧 커스텀 훅:
useTodos구조 분석todosnextIdaddTodoresetTodosdeleteTodotoggleTodoeditTodo🛠️ 기능별 상세 분석 및 구현 로직
✍️ 할 일 등록
기능 설명
변수 설명
textdeadlineonAddnewTodo{id, text, checked, deadline}객체로직 흐름
🔍 AddTodo 컴포넌트 코드
🔍 addTodo 함수 코드
🔄 전체 목록 초기화
기능 설명
변수 설명
onReset로직 흐름
confirm()으로 사용자 의사 확인🔍 ResetTodos 컴포넌트 코드
🔍 resetTodos 함수 코드
❌ 할 일 삭제
기능 설명
변수 설명
id로직 흐름
🔍 deleteTodo 함수 코드
✔️ 완료 체크
기능 설명
변수 설명
id로직 흐름
🔍 toggleTodo 함수 코드
🗂️ 목록 분류: 진행 / 완료
기능 설명
checked)에 따라 두 개의 리스트로 분리하여 렌더링변수 설명
undoneTodosdoneTodos로직 흐름
🔍 App 컴포넌트 코드
📅 마감순 정렬
기능 설명
변수 설명
sortedTodosaHasDeadlinebHasDeadline로직 흐름
🔍 TodoList 컴포넌트 코드
✏️ 마감기한 수정
기능 설명
변수 설명
todonewDeadlineonEdit로직 흐름
🔍 TodoItem 컴포넌트 코드
🔍 editTodo 함수 코드
💾 로컬 스토리지 연동
기능 설명
변수 설명
initStategetItemsetItem로직 흐름
getItem()으로 설정setItem()실행🔍 useTodos 커스텀 훅 코드
🔍 로컬 스토리지 코드