Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chat] beforeSentMessages 초기 props만 저장하도록 수정 #2969

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

choisohyun
Copy link
Contributor

@choisohyun choisohyun commented Oct 30, 2023

PR 설명

변경 내역

  • prop의 default value가 배열이나 객체일 경우 useEffect에서 같은 값으로 인식하지 못하고 계속 감지하여 루프에 빠지는 현상이 있습니다.
  • 전송 후 비워주는 코드를 추가하고 초기 값만 받아서 업데이트하도록 수정합니다.

체크리스트

스크린샷 & URL

@choisohyun
Copy link
Contributor Author

release-canary

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (b7a7a46) 12.17% compared to head (c9be97f) 12.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2969      +/-   ##
==========================================
- Coverage   12.17%   12.17%   -0.01%     
==========================================
  Files         687      687              
  Lines       36212    36213       +1     
  Branches     8941     8943       +2     
==========================================
  Hits         4410     4410              
- Misses      31795    31796       +1     
  Partials        7        7              
Files Coverage Δ
packages/chat/src/chat/chat.tsx 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link

v13.8.2-pr-2969.3 has been published!

@choisohyun choisohyun changed the title fix(chat): 초기 props만 저장하도록 수정 [chat] beforeSentMessages 초기 props만 저장하도록 수정 Oct 31, 2023
@choisohyun choisohyun self-assigned this Oct 31, 2023
@choisohyun choisohyun marked this pull request as ready for review October 31, 2023 04:52
@choisohyun choisohyun requested a review from a team as a code owner October 31, 2023 04:52
@choisohyun choisohyun requested review from zzolain, zhsks528 and torres-triple and removed request for a team October 31, 2023 04:52
@github-actions github-actions bot added the chat label Oct 31, 2023
@choisohyun choisohyun added this to the v13.8.2 milestone Oct 31, 2023
@choisohyun choisohyun merged commit 99c2c38 into main Oct 31, 2023
12 checks passed
@choisohyun choisohyun deleted the fix/chat-render branch October 31, 2023 04:56
message: beforeSentMessages,
})
}, [beforeSentMessages])
initBeforeSentMessages &&
Copy link
Contributor

Choose a reason for hiding this comment

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

initBeforeSentMessages의 default값이 []이기 때문에 항상 이 구문은 참일 것 같아요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#2975
요기서 수정했습니다!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants