Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
robertoandred
· 3y ago · 0 comments
How do you manage page-wide data consistency in Rails without a page refresh?
Comments
[–]
whatshisface
3y ago
You make sure you're only trying to do frameworkless development on pages where "data consistency" means "the text box displays the text that's in the text box." :-)
[–]
theappsecguy
3y ago
There’s multiple approaches. Since everything is server side rendered, you can for example, stream updates through web sockets
[–]
robertoandred
OP
3y ago
Sounds like a lot of latency, waiting for the backend to render a template and send it over the wire every time the user presses a button.
[–]
theappsecguy
3y ago
You don’t re render a template. Only what you need to. If it’s a single div then so be it. Which is why it’s SPA-like experience with server side code
[–]
robertoandred
OP
3y ago
And where does that new div come from? It's not a backend template?
[–]
jasonm89
3y ago
Hotwire