Skip to content
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

suspense Error #6

Open
bellmin9321 opened this issue Mar 15, 2023 · 0 comments
Open

suspense Error #6

bellmin9321 opened this issue Mar 15, 2023 · 0 comments

Comments

@bellmin9321
Copy link
Owner

bellmin9321 commented Mar 15, 2023

에러내용

Error1: Hydration failed because the initial UI does not match what was rendered on the server.
Error2: This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.

해결 방법

queryClient.ts

import { QueryCache, QueryClient } from 'react-query';

export const queryClient = new QueryClient({
  defaultOptions: {
    queries: {
      retry: 0,
      staleTime: 60000,
      suspense: true, <<<<<<<<<<<- 삭제
    },
  },
  }),
});

참고

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

No branches or pull requests

1 participant