Open jdegand opened 2 months ago
Usually, this is a code smell.
In app/provider.tsx, you used const [queryClient] = useState(() => new QueryClient());.
app/provider.tsx
const [queryClient] = useState(() => new QueryClient());
The tanstack docs define the queryClient outside of the function.
const queryClient = new QueryClient() export default function App() { return ( <QueryClientProvider client={queryClient}> <Example /> </QueryClientProvider> ) }
I think useRef could also be a potential solution.
useRef
that's correct, could you do a PR sir?
Usually, this is a code smell.
In
app/provider.tsx
, you usedconst [queryClient] = useState(() => new QueryClient());
.The tanstack docs define the queryClient outside of the function.
I think
useRef
could also be a potential solution.