Discover more from Boring Rails
Thinking in Hotwire: Progressive Enhancement
Your mental model for Hotwire should be progressive enhancement: use the least amount of the tooling as possible to achieve your desired outcome
There are many tutorials about how to get started with Hotwire and how to use the individual pieces. But one thing that took me a while to grasp was how to “think in Hotwire”.
Hotwire itself is an overarching concept (HTML-over-the-wire) and you’ll need to know when to use the different pieces (Turbo Drive, Frames, Streams, Stimulus, Turbo Native, Strada).
Because Hotwire is a collection of tools, you can solve problems multiple ways. There are features you can build with Frames that you could also build with Streams. You can always drop to a “lower level” tool and make something work.
I think the best approach comes from the earliest days of web development: progressive enhancement.
👉 Read it here: Thinking in Hotwire: Progressive Enhancement
📣 Thoughts? Join the discussion on Twitter