Jumping Back
Jumping Back•2mo ago

i want the first data from server and

i want the first data from server and after that i want client to take over any idea how?
15 Replies
erquhart
erquhart•2mo ago
What framework?
Jumping Back
Jumping BackOP•2mo ago
RR7 i can get data from the server fine but if i also load the data on client it will fetch twice no? i also got inspiration from x.com and it seems like they also do client side so maybe only client side
erquhart
erquhart•2mo ago
Yeah Convex officially only has client side support for rr7 And it would be separate fetches, server fetches initial data during SSR, and the client makes a websocket connection to go from server fetched data to realtime. But yeah, client generally works really well unless you have specific requirements that only SSR can provide
Jumping Back
Jumping BackOP•2mo ago
erq making a reddit mix discord mix forum kinda website looked at x.com and insta they have / for signup and stuff where as reddit displays stuff normally insta is like x.com they also show sign in first which one do you prefer? / for main content or / for sign in and /home for content?
erquhart
erquhart•2mo ago
Big services are going to need SSR generally as they're optimizing heavily My personal recommendation is make your thing the easiest way possible, get real users, optimize when it starts to matter
Jumping Back
Jumping BackOP•2mo ago
aah my 2 users on my side project lol
erquhart
erquhart•2mo ago
lol 100% the same wiring that makes us like writing code also tends to make us very prone to prematurely optimizing things lol. I am a recovering serial premature optimizer 🙈
Omar
Omar•2mo ago
@erquhart What framework would you recommend that gives us the most flexibility? If SSR with RR7 isn't officially supported by Convex, so if it becomes needed it's not as straightforward then I've been making internal apps where SEO isn't a concern so RR7 has been fine for me but the next project is more hybrid and could benefit there
erquhart
erquhart•2mo ago
Love it or hate it, nothing is more turnkey than Next.js right now. I can't wait for TanStack Start to go stable, but until then, this remains true. Convex does absolutely support TanStack Start, but "support" means different things for stable vs. prerelase frameworks.
Jumping Back
Jumping BackOP•2mo ago
I have no clue why someone would prefer tanstack start over RR7 It's so much easier
Omar
Omar•2mo ago
I had a feeling it would come down to those two... with AI codegen, I'll probably better served with going with NextJS.
erquhart
erquhart•2mo ago
The advantage of Nextjs is that it's been around a long time and everyone uses it. Nothing inherent to it's design, moreso it's position.
Omar
Omar•2mo ago
Fair enough @erquhart Does usePreloadedQuery retain reactivity?
erquhart
erquhart•2mo ago
Yep
Omar
Omar•2mo ago
Awesome! that clears it up for me, thank you

Did you find this page helpful?