[Refactor] 좋아요/좋아요 취소 시 식당 목록 요청 polling -> SSE#479
[Refactor] 좋아요/좋아요 취소 시 식당 목록 요청 polling -> SSE#479
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.Add a .trivyignore file to your project to customize which findings Trivy reports. |
Issue Number
#478
To-Be
픽잇 과정에서 좋아요/좋아요 취소로 인한 식당 정보 변경 시 요청 방식을 polling에서 SSE로 변경했습니다. 좋아요/좋아요 취소 시 SSE 이벤트 전송 -> React Query 캐시 무효화를 통해 모든 참여자의 화면을 동기화합니다. 현재는 서버에서 구체적인 변경 정보 없이 변경되었다는 신호만 전달하므로 onMessage가 아닌 addEventListner 방식을 사용했습니다.
onError 시 2회 연결을 재시도하며 이후에는 연결 종료 후 토스트를 표시했습니다.
Check List