My recommendation: Turbo Drive & Pagemorphs are what most people should use for most problems. Drive reduces flickering between page loads and Pagemorphs list to channels on the server to reload the page if something changed.
I think Turbo would benefit from positioning itself more closely to Rails and simplifying the terminology. If you look at the https://hotwired.dev website, you won’t find Rails and you’ll find a bunch of words like Stimulus, Drive, Streams, Broadcast, etc. The docs aren’t entirely coherent either.
Can't really see how making it more Rails-centric would help - more likely it'd just cause a fork for everyone using Hotwire without Rails/Ruby.
hakunin•3mo ago
cientifico•3mo ago
One classic case is user notifications - like the user icon in the corner. That's perfect as a permanent lazy frame, with a subscription watching for any user-related updates. This way you don't have to think about updating that widget across different pages, and you can centralize all user-related async events in
one controller.
Another pattern is real-time dashboards. You never know which part of the dashboard will change, and it's actually simpler on the backend: you just track what was updated and push that specific part. Clean and efficient.
hakunin•3mo ago