One pattern you can do is send events to the server, server renders data asynchronously (maintains state for each client in a lightweight process), then ships result back to client via websocket binary frames.
You also decide how much rendering happens where. Can even do whole HTML elements on the server if you want.
N2O framework might do that.
https://github.com/5HT/n2o
Book:
https://synrc.com/apps/n2o/doc/book.pdf
One pattern you can do is send events to the server, server renders data asynchronously (maintains state for each client in a lightweight process), then ships result back to client via websocket binary frames.
You also decide how much rendering happens where. Can even do whole HTML elements on the server if you want.