Remix.run Logo
geon 2 hours ago

The server would keep a copy of the virtual dom during the session. Each change would be diffed and the diff sent to the client to apply. The client would only apply apply changes from the server, not change the dom on its own, so they wouldn’t get out of sync.

I can render to html, but then I’d need to parse the html back do diff it. Seems stupid.

I tried building a redux-style spa like that. Worked fine. https://github.com/geon/server-side-spa/tree/main/src/server