DS-Volare / front-end

0 stars 0 forks source link

[Feat] 유저 관리 API 작성: 회원가입 및 로그인, 로그아웃, Refresh token 재발급 #37

Closed otcroz closed 3 weeks ago

otcroz commented 1 month ago

⚙️ 기능 설명

react-query를 통해 스프링부트 서버에서 구현한 로그인 및 회원가입 API를 연결합니다.

✅ To-do

📑 참고 자료

otcroz commented 1 month ago

🚨 react-query 설치 후 QueryClient를 초기화하는 과정에 오류 발생

QueryClient를 초기화하는 과정에서 cacheTime에 빨간줄이 생기며 오류가 발생했다.

const queryClient = new QueryClient({
  defaultOptions: {
    queries: {
      staleTime: 1000 * 60,
      cacheTime: 1000 * 60 * 5,
    },
  },
});

오류 원인을 살펴봤더니, 버전 업데이트를 하면서 cacheTime에 대한 옵션을 제거한 것이었다. (enabled, staleTime, refetchInterval, select 등등의 옵션만 제공한다.)

참고자료: https://tanstack.com/query/latest/docs/framework/react/guides/important-defaults