Skip to content
This repository was archived by the owner on Mar 7, 2022. It is now read-only.
This repository was archived by the owner on Mar 7, 2022. It is now read-only.

possible add nextauthjs / react-query in existing react-query ? - No QueryClient set, use QueryClientProvider to set one #7

@isggwp

Description

@isggwp

I am sory maybe sounds like the questions. I've existing next auth, and react-query setup. then i adding /nextauthjs/react-query lib with

import { useSession } from "@next-auth/react-query"

const [session, loading] = useSession({
  required: true,
  redirectTo: "/auth/sign-in?error=InvalidSession",
  queryConfig: {
    staleTime: 60 * 60 * 3, // 3 hours
    refetchInterval: 60 * 5 // 5 minutes 
  }
})

and i got some error
No QueryClient set, use QueryClientProvider to set one

any or something wrong or need additional setup on my code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions