Skip to content

[week5][이예은] 과제 제출#44

Open
Yeeunleel wants to merge 2 commits intoyeeun-week5from
yeeun-week5-hw
Open

[week5][이예은] 과제 제출#44
Yeeunleel wants to merge 2 commits intoyeeun-week5from
yeeun-week5-hw

Conversation

@Yeeunleel
Copy link

💎 과제 구현 설명

과제를 위해 사용했던 함수, 수정한 파일 등 구현 내용에 대한 간단한 설명을 작성해 주세요.

  • post detail page에 댓글 작성/수정/삭제 기능 추가
  • 댓글 작성한 날짜가 기록되도록 함
  • commentList array를 만들고 useState로 관리(default: dummy data, 수정된 댓글 내용 반영, 새로운 댓글 추가)

🏁 PR 체크리스트

  • 코드가 오류 없이 정상적으로 실행되나요?
  • 커밋 메시지 컨벤션(템플릿 활용)을 준수했나요?
  • 과제 마감기한을 준수했나요?

🖼️ Screenshot / Video

🙌 Issue

과제 수행 중 어려웠던 부분이나 궁금했던 점을 자유롭게 작성해 주세요.

@Yeeunleel Yeeunleel self-assigned this Apr 11, 2024
@Yeeunleel Yeeunleel changed the title Yeeun week5 hw [week5][이예은] 과제 제출 Apr 11, 2024
Copy link

@sisihae sisihae left a comment

Choose a reason for hiding this comment

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

멋져요👍

</button>
<button
onClick={() => {
setEditedComment([]);
Copy link

Choose a reason for hiding this comment

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

빈 리스트로 만들어주는 이유가 궁금해요

Copy link

@TaehyeungKim TaehyeungKim left a comment

Choose a reason for hiding this comment

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

수고했어요!!!👍

// TODO: comments를 저장하기 위한 state를 만들어주세요
const [commentList, setCommentList] = useState(comments);
// TODO: 새로운 댓글을 추가하기 위한 state를 만들어주세요
const [newComment, setNewComment] = useState([]);

Choose a reason for hiding this comment

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

새로운 댓글은 아무래도 string 형태의 데이터일 것이니, 초기화 시 빈 배열보다는 빈 문자열 ("")로 하는 것이 더 적합하지 않을까 생각해요!

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.

3 participants