-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SSR support #2219
Comments
What's the required change for this feature? Reading the code of @electric-sql/react package, it seems that we need to extend the UseShapeOptions options to acccept a I am available to work on this issue personally if necessary. |
I've made some experiments with the pattern in the past. We can definitely use the It would be awesome if you want to work on a better SSR support for Electric. |
Thank you for sharing that. I'm thinking of experimenting over the weekend to see how much I can achieve. |
The basic pattern is that when server rendering, the resolved shapes' data is serialized to the HTML as JSON and then hydrated into shapes again when the client is setup.
We can modify
getShape
in the client so that when it creates a new shape, it first looks to the HTML for serialized shape data.The text was updated successfully, but these errors were encountered: