The Hotwire example treasure trove by Sean Doyle
This Github repo has been making the Twitter and Discord rounds lately, and for good reason.
Each branch in the repo contains a writeup and full implementation of a common UX pattern built with Stimulus and Turbo. Keep this handy and reference the examples when you need them.
Live reloading for Hotwire Rails apps by Kirill Platonov
With the demise of Webpacker (more on that below), replacing webpack-dev-server is top of mind for many folks. Kirill explored this problem and built a gem
to tackle it.
Remote modals with Rails, Hotwire, and Bootstrap by Benito Serna
This quick article offers a slightly different take on implementing server-rendered modal content with Turbo, hooking into the before-render callback to neatly transition the modal out when needed.
Pagination in Rails from scratch by Ana Nunes da Silva
Implementing common application needs from scratch can be a really interesting learning exercise. It can be worth doing even if just to get more comfortable reasoning about the problem before reaching for a battle-tested gem.
In this article, you’ll build a simple pagination system from scratch, complete with a front end implementation and the standard set of convenience methods.
Speaking of building things from scratch, ICYMI, Steve Polito’s recent look
at building an authentication system from scratch is a good read.
Dueling tutorials: Two ways to lazy load tooltips with modern Rails
Steve Polito published “Hotwire: Asynchronously loaded tooltips
” last week based on code from Sean Doyle. This is a well-constructed article guiding you through remotely loaded tooltips powered by Turbo Frames. As a bonus, it includes a nice use of TailwindCSS’s peer
Julian Rubisch read Steve’s article and was inspired to write up an alternative implementation
of the same functionality with Futurism
. As Julian notes in the article, Futurism can offer a simpler migration path for legacy applications that were not designed from zero with Turbo Frames in mind.
Sometimes we can get stuck in one single path forward — Julian’s response article is a great reminder that there are usually alternatives out there when we need them.
On Stimulus Reflex: Why and Why by Stephen Margheim
This is a thoughtful, code-free read from Stephen. Inspired by conversations on the StimulusReflex Discord
, Stephen presents a take on how StimulusReflex fits into a Turbo-powered Rails world.
Rails 7 features, before and after by Zakaria Fatahi
This gist is a nice, compact introduction to some of the most interesting new features in Rails 7. A nice bookmark to read when you’re making the Rails 7 upgrade.