Use react-query with IndexDb with SSR randomly throws window not defined
I have a code similar to this:
It ramdonly throws window not defined, this is cause because I'm using it with SSR (NextJS).
My current solution is to disable the fetch until the component mounts but in that case "isLoading" is false, Is there a way to have "isLoading = true" until you actually start fetching the data client side?
1 Reply
eager-peach•2y ago
isPending
But you obviously don’t use latest v5