useSuspenseQuery with Next.js app router
I've read through the docs, and I have a grid of project objects that uses the app router prefetching with streaming technique successfully:
However, I run into an issue with these ProjectBox objects. I use a separate query for the individual projects so that mutations and invalidation can be isolated instead of affecting all projects. Because the ProjectBox objects never render until all the project data is present, I use initialData from allProjects to fill the project query, so there should be 0 delay between all projects data being present and showing the projectBox.
This is not what I observe. The box loads for a few seconds once it appears on the client, it takes the time to run each full individual project query. Does anyone have experience with this situation? I don't need a useSuspenseQuery for the individual box, because it should be guaranteed to have initialData. I've tried to use the enabled flag, it doesn't work.
Here's my current query:
0 Replies