jsonapi-react icon indicating copy to clipboard operation
jsonapi-react copied to clipboard

How does setting initialData work?

Open webwelten opened this issue 3 years ago • 0 comments

Hey y'all,

the library is used in a nextjs project. I'm trying to make use of initialData for SSR as explained here. It seems that even with initialData set the endpoint is still requested in the client. I'm trying to understand what's going on in code but must admit that, without comments, it's not trivial for me to understand.

Could you help me debug the problem and figure out how initialData should be used correctly? This could also be an attempt to comment the code a little more.

I'm using useQuery and I'm wondering how initialData is been taken into account when running through your code.

webwelten avatar May 11 '22 10:05 webwelten