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.
과제 제출 날짜
23-10-30 (월요일)
풀이 방법
어떻게 풀었나요? 나만의 핵심 포인트를 말해주세요!
util 폴더 안에 있는 데이터 파일인 TodoDataset에서 이미지와 할일 목록을 받아와 useState, useEffect를 이용하여 데이터를 불러주었습니다. TodoList에 props를 이용하여 데이터를 전달해주고, map을 통해 반복하여 출력해주었습니다.
버튼 활성화 상태와 비활성화 상태 시 text 변화를 주기 위해 handleClick 함수를 사용하였으며, 버튼이 활성화 상태일 때만 클릭할 수 있도록 해주었습니다.
어려웠던 점
기능을 구현하며 가장 어려웠던 부분은 뭐였나요?
data 파일에서 img가 images/ 부터 시작하여 todo-list부분에서 img 경로를 바꿔줘야 사진이 제대로 불러와지는데, 이 부분에서 많이 헤맸습니다.
리액트 특성상 컴포넌트로 구현하다보니 데이터를 불러오는 부분 또한 3개의 컴포넌트로 쪼개졌습니다. 기존 css로 한번에 작성하던 방식과 달리 각 컴포넌트에서 styled-components를 이용하여 컴포넌트마다 스타일을 적용하기 때문에 이 부분에서 힘들었습니다.
과제 번호