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
What framework?
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
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
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?
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
aah my 2 users on my side project lol
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 🙈
@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
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.
I have no clue why someone would prefer tanstack start over RR7
It's so much easier
I had a feeling it would come down to those two... with AI codegen, I'll probably better served with going with NextJS.
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.
Fair enough
@erquhart Does usePreloadedQuery retain reactivity?
Yep
Awesome! that clears it up for me, thank you