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
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!
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.
@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.Hi @Out and Back I had the same problem: https://discord.com/channels/1019350475847499849/1308786329068240938