Out and Back
Out and Back4w ago

Preloading stateful pagination

Can you mix usePreloadedQuery with usePaginatedQuery? I'm server-rendering search results for SEO purposes in Next 15 — but once the client's hydrated, from there I want to empower the use to filter.
4 Replies
Convex Bot
Convex Bot4w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
ballingt
ballingt4w ago
You could do this by using the preloaded data as the initial data for a query by using that data if no data has loaded yet.
Out and Back
Out and BackOP4w ago
@ballingt Thanks. It seems like usePaginatedQuery doesn't support initial data. I'll try to play with this a bit more. Hm, yeah, this feels a lot harder than tRPC. I'm sure I'm missing something.

Did you find this page helpful?