Skip to content

임유미 week2#32

Merged
bk-git-hub merged 4 commits intoLimlim0208from
Limlim0208-week2
Mar 29, 2026
Merged

임유미 week2#32
bk-git-hub merged 4 commits intoLimlim0208from
Limlim0208-week2

Conversation

@Limlim0208
Copy link
Copy Markdown

✅ 제출 정보

  • Week: Week <02>

✅ 체크리스트 (필수)

  • PR의 base branchmain이 아니라 내 GitHub 핸들 브랜치(<handle>)다
  • compare branch가 <handle>-week-xx 형식이다
  • 변경 사항이 이번 주 과제 범위에 해당한다
  • (필요 시) 실행 방법을 적었다
  • (가능하면) 결과 스크린샷/데모 링크를 첨부했다

🧩 구현 내용 요약

image image
  • 1주차 코드 피드백 반영 및 리팩토링
  • 체크박스 할 일 목록 구현
  • 리스트 렌더링 구현
  • 조건부 렌더링 구현

❓ 궁금한 점

  • 없습니다!

Copy link
Copy Markdown
Collaborator

@bk-git-hub bk-git-hub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

유미님 고생하셨습니다

전반적으로 이번 주 목표에 맞게 잘 구현해 주셨습니다.
이번주 코멘트는 불필요한 부분 지우는 위주로 달아두었습니다

const checkIcon = "✅";
const title = "오늘의 할일";
import TodoHeader from "./TodoHeader";
import TodoCard from "./TodoCard";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TodoCard는 현재 이 파일에서 사용중이지 않으니 임포트를 지워주시면 좋습니다

export default function TodoList() {
const cardsList = todoItems.map((todoItems) => (
<TodoCard
key={todoItems.key}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key는 리액트가 리스트비교용으로 사용하는 특별한 prop이라서 TodoCard 내부 props로는 내려오지 않아요. 식별값이 필요하다면 key 대신 id 같은 별도 필드로 넘겨주는 쪽이 더 자연스럽습니다.

Comment on lines +4 to +11
key,
text,
isChecked,
}: {
key: number;
text: string;
isChecked: boolean;
}) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TodoList 에서 언급한 부분입니다. key prop은 일반적으로 사용이 안됩니다

import { todoItems } from "./data";

export default function TodoList() {
const cardsList = todoItems.map((todoItems) => (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

map 콜백 변수 이름이 배열 이름과 같아서 조금 헷갈릴 수 있어요. todoItem처럼 단수형으로 바꾸면 읽기가 더 편해집니다

return (
<>
<li className={"todoCard " + (isChecked ? "checked" : "")}>
<input type="checkbox" checked={isChecked} key={key} />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

지금은 체크 상태를 화면에만 보여주는 단계라서 readOnly를 함께 적어 두면 좋아요. onChange로 상태를 바꾸는 방식은 다음에 state를 배운 뒤에 연결하면 더 자연스럽게 이해할 수 있습니다.

}
return (
<>
<ul id="todoList" className="control-container">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

control-container클래스는 현재 연결된 스타일이 없어서 지우셔도 될듯 합니다.

@bk-git-hub bk-git-hub merged commit 595154a into Limlim0208 Mar 29, 2026
1 check passed
@bk-git-hub bk-git-hub deleted the Limlim0208-week2 branch March 29, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants