Skip to content

Conversation

@altmit
Copy link
Member

@altmit altmit commented Nov 21, 2024

구현한 것

@altmit altmit self-assigned this Nov 21, 2024
import { userKeys } from "./queryKeys";

export default function useUserQuery(cookies?: Record<string, string>) {
return useQuery({
Copy link
Member Author

Choose a reason for hiding this comment

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

useSuspensequery를 사용했을 때 문제가 있었는데 정확한 이유를 추후 찾아 수정할 필요있음


export default function UserDropdown() {
const { user } = useContext(UserContext);
const { data: user } = useUserQuery();
Copy link
Member Author

Choose a reason for hiding this comment

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

당장에 구현에는 설계한 방향으로 진행되고 있으나, tanstack query 캐싱이 아닌 브라우저의 http 캐싱으로 캐싱되어 이루어지고 있는 것 같음.

이 부분 다음 이슈 또는 추후에 개선이필요함

@altmit altmit merged commit c0e9411 into dev Nov 21, 2024
1 check passed
@altmit altmit deleted the refactor/#22-header-iport-and-user-refactor branch November 21, 2024 11:42
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.

2 participants