Convex for SSR
I'm looking to use
convexHttpClient
for SSR in a Next.JS app. The query
I'm executing returns documents. Is there a best practice on serializing and rehydrating this response between server/client? Right now, Next is barfing on handling the Id
fields when passing the Convex query response to props
in getServerSideProps
.
I understand I could manually do Id.toString()
on each instance in the query response, but this adds a lot of object manipulation and spec'ing, rather than just passing around an instance of the Convex api typing.
I saw the note in the Next integration docs of "We are investigating ways to combine Next.js server-side rendering with end-to-end reactivity. Stay tuned!" Any progress here?1 Reply
We have released the tighter integration with Convex (finally π )
https://news.convex.dev/announcing-convex-1-8/
Convex News
Announcing Convex 1.8
Happy New Year! At Convex weβre kicking the year off with another release!
Highlights:
* New simpler API for loading and preloading data from Convex in Next.js server-side
* Team usage breakdown by function on dashboard
convex/nextjs for Next.js
A new entrypoint in the convex package provides an