cornpopguy
cornpopguy9mo ago

Preloading queries

Hi guys, is it possible to preload the first query on the server? (found it: https://docs.convex.dev/client/react/nextjs/server-rendering)
2 Replies
Michal Srb
Michal Srb9mo ago
Yes, use preloadQuery. If the query requires auth (Clerk), you might need this helper: https://github.com/Nutlope/notesGPT/blob/main/lib/hooks.tsx
GitHub
notesGPT/lib/hooks.tsx at main · Nutlope/notesGPT
Record voice notes & transcribe, summarize, and get tasks - Nutlope/notesGPT
cornpopguy
cornpopguyOP9mo ago
Okay, thanks. It works perfectly even without using the hooks.tsx you provided, I just followed the docs.

Did you find this page helpful?