-
Notifications
You must be signed in to change notification settings - Fork 3
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
[ Fix/#471 ] 수정하기 페이지 최신화 안되는 거 수정 #472
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빠른 반영 감사합니다 리뷰 확인해주세요!
src/pages/postPage/hooks/queries.ts
Outdated
queryKey: [QUERY_KEY_POST.getEditPostContent, postId, isEditView], | ||
queryFn: () => fetchEditPostContent(postId), | ||
enabled: !!isEditView, | ||
staleTime: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p2)
staleTime 0으로 두는 방법 보다 글 수정했을 때 글 조회 api 쿼리를 invalidate해주는 방법이 더 좋지 않을까요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
라고 저도 생각했는데 생각만하고 안했어요 반영할게요~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p2) staleTime 0으로 두는 방법 보다 글 수정했을 때 글 조회 api 쿼리를 invalidate해주는 방법이 더 좋지 않을까요??
동의합니다!
src/pages/postPage/hooks/queries.ts
Outdated
queryKey: [QUERY_KEY_POST.getEditPostContent, postId, isEditView], | ||
queryFn: () => fetchEditPostContent(postId), | ||
enabled: !!isEditView, | ||
staleTime: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p2) staleTime 0으로 두는 방법 보다 글 수정했을 때 글 조회 api 쿼리를 invalidate해주는 방법이 더 좋지 않을까요??
동의합니다!
✨ 해당 이슈 번호 ✨
closes #471
todo
📌 내가 알게 된 부분
보니까 처음 수정하기에 들어갔을 경우에는 잘 받아와지는데, 한 번 수정완료한 후 다시 수정하기에 들어가면 안받아와지더라구요
요청이 아예 안가고있었어요!
캐시된 데이터 때문에 요청이 안 가고 있길래 staleTime : 0 으로 설정해서 매번 수정하기 글 받아오기 api의 경우 새로운 요청이 가도록 해두었습니다.
📌 질문할 부분
📌스크린샷(선택)
2024-11-06.4.38.24.mov