Refactor/#414-B: query 중복 코드 useWorkspaceQuery 적용#415
Open
Conversation
Collaborator
|
고민거리에 써주신 내용은 E2E 테스트를 말씀하시는거겠죠? |
Member
Author
@se030 네네네! |
Member
|
Wow |
Member
Author
|
@wcho21 원희님 리뷰 부탁드려요 🙏🏻 |
wcho21
approved these changes
Dec 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤠 개요
💫 설명
같은 query 로직이 흩어져 있을 때 이런 문제가 발생할 수 있어요!
queryKey를 잘못 쓸 수 있음queryFn을 잘못 쓸 수 있음따라서 해당 로직을
useWorkspaceQuery훅에서 관리해 똑같은 동작을 보장해요.client/src/pages/Workspace/index.tsx여기도getWorkspace를 호출하고 있더라구요🌜 고민거리 (Optional)
Q. 테스트코드 써볼까요?
client/src/pages/Workspace/index.tsx같이 로직이 좀 있는 걸 고치려면 테스트 코드가 있어야 할 것 같아요.📷 스크린샷 (Optional)