⚡️ Hotwire dev newsletter - September 2022 edition

A curated, monthly roundup of the best Turbo (Native), Stimulus, and Strada articles, code, courses, and more by Joe Masilotti.

Welcome back to the September edition of the ⚡️ Hotwire dev newsletter! Big news this month: Turbo v7.2.0 was released with “the largest upgrade to this cornerstone of Hotwire since we first released the framework” according to DHH. Check out the first link below for more info and what I’m most excited about.

Speaking of being excited, I’m speaking at The Rails SaaS Conference in LA next week! My talk is on hiring and working with junior Rails developers and what we can do to support them. If you’re attending then come say hi – I’d love to meet you in person.

Also, starting in October I’ll be focusing 100% on RailsDevs and my upcoming Turbo Native workshop. I didn’t forget about it! 🙈 I’ll be sharing more updates on this newsletter next month and on Twitter. Until then, what are you hoping to learn from the workshop? Reply to this email to let me know.

📰 News

Turbo v7.2.0 released

The latest version of Turbo was released with a whopping 23 new features and 41 bug fixes are included. I’m most excited about Custom Elements and Stream Action Types. Together, these enable a whole new ecosystem of third-party plugins and extensions that build on Turbo Streams to create custom actions, like TurboReady.

Rails Hackathon 2022 Winners

Chris Oliver of GoRails organized a remote Rails Hackathon – 48 hours to build your best Ruby on Rails application. And the theme this year was Hotwire! 84 teams started and 25 of them submitted entries. There’s some impressive stuff here and it shows what can be done with Rails + Hotwire in just one weekend. Congratulations to all the teams that finished.

Thinking in Hotwire: Progressive Enhancement

by Matt Swanson @_swanson

Matt outlines his thought process when navigating through the Hotwire stack and when to reach for the next level of interaction (and complexity). Start with HTML-only CRUD, upgrade to full <body> replacements with Turbo Drive, swap out a Turbo Frame or two, make everything real-time with Action Cable, sprinkle in some Stimulus, and finally reach for Turbo Native. “The nice part about this approach is that you can build versions of features quickly, test and iterate based on feedback, and then layer on more real-time and interactive functionality as needed.”

🎥 Videos

Building an e-commerce platform for creators

by CJ Avilla @cjav_dev

CJ Avilla, developer advocate at Stripe, launched a massive 33 video tutorial series. Learn how to build an e-commerce platform for creators including checkout, Tailwind UI, onboarding, Stripe Connect, and even DALL-E generated logos! CJ always puts out high quality content and this series is no exception.

Event Scheduling App (Calendly clone) with Ruby on Rails 7

by Web-Crunch @webcrunchblog

Web-Crunch is back with another “clone that app in Rails” series. All 6 parts are released and available to view for free. Almost 3 hours of video tutorials cover everything from modeling the app, setting up the UI, and integrating with Stripe for payments.

🎓 Tutorials and guides

Building a modal form with Turbo Stream GET requests and custom stream actions

by David Colby @davidcolbyatx

Learn how to build a Turbo Stream-powered modal form without a single Turbo Frame in this lengthy tutorial. The first half goes from rails new to working modal and you could stop there. But if you want to learn about custom Turbo Stream actions then I recommend the second half. “It’ll be pretty fancy. It will also be completely unnecessary.” 🤓

How to Render a Native Home Screen with Turbo-iOS

by William Kennedy @_williamkennedy

Another Turbo Native tutorial! 🎊 Here, William outlines how to use a native tab bar to organize two different screens in a turbo-ios app. The first tab is a fully native screen and the second is a Turbo-powered web view. This approach is powerful because it enables high-fidelity experiences like the HEY or Basecamp mobile apps.

Calendar component using ViewComponent and Hotwire

by Andrew Foster

Ever wanted to use that fancy Tailwind UI calendar component but didn’t want to wire up all the custom JavaScript? Andrew to the rescue in this code-focused tutorial. He covers the HTML to layout and style the component, the Hotwire-powered controller to handle next/previous links, and wraps it all up with a Stimulus controller to toggle the display.

How we upgraded from Rails 6 to Rails 7

by Abhishek T

This article covers a bunch of gotchas (with solutions) when upgrading to Rails 7. Abhishek covers migrating from attr_encrypted to Active Record Encryption, fixing broken images in Active Storage, autoloading failing during initialization, external redirection errors, and more.

👀 One more thing…

Unfortunately named Ruby methods, a thread. “strftime, is it stir fry time? Sad news, it’s not. But it will format a date according to a given string format.” 😆

Joe Masilotti
@joemasilotti joe@masilotti.com