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.
해결한 이슈
해결 방법
Assignment 1-4 - 투두 리스트 스타일링 & 투두 아이템 생성
Input, Button
컴포넌트를 사용하고, 이들을 커스텀한 폼 안에 넣어 구현.useTodoInputForm
커스텀 훅으로 분리.비활성화(disabled) 제어
onCreateNewTodoSubmit
메서드가 호출되어 새로운 Todo 가 추가된 리스트를 새로onGetTodo
한다.리렌더링
이 이뤄지므로써 새로운 Todo 가 추가된 투두 리스트를 확인.Assignment 1-5 - 투두 아이템 수정, 삭제
수정 모드
가 있다고 요구사항에 있음.isEditMode
상태에 따라완료 여부, 기존 Todo 내용 수정 입력 컴포넌트, 수정 모드일 때 버튼 컴포넌트
를조건부 렌더링(Conditional Rendering)
처리해서 구현.useTodoItem
커스텀 훅에서 처리.onGetTodo
를 호출해서todos
상태를 업데이트해서 리렌더링 필요.추가적인 태스크
제어 컴포넌트(Controlled Component)
방식을 취하고 있지 않아도 된다. 따라서비제어 컴포넌트(Uncontrolled Component)
방식으로 변경하거나디바운스(Debounce)
를 이용해 불필요한 리렌더링을 방지하는 것이 성능 차원에서 좋겠다.PR Submit 이전에 확인하세요 !
체크리스트