⚡️ Hotwire dev newsletter - July 2021 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 ⚡️ Hotwire dev newsletter! This edition covers the latest Turbo release, a video course on how to learn Hotwire by building a forum, an open source Turbo-iOS starter project, an opinionated collection of Stimulus best practices, and more.

I’m also super excited to announce that the ⚡️ Hotwire dev newsletter has it’s first official sponsor. A huge thank you to Arrows - they help companies and their customers collaborate during product onboarding - all powered by Ruby on Rails and Hotwire.

If you find (or publish!) Hotwire content and would like it included in the next edition then reply to this email. You can also reach out on Twitter .

📰 News

Turbo beta 8 release

The latest Turbo beta was released last week, the first big code change to Hotwire in a while. From the release notes:

Allow elements to avoid the snapshot cache when tagged with data-turbo-cache='false' (no more manually removing flash elements!). #238

Hotwire’s homepage is now hotwired.dev (with a ‘d’)

For a while the old URL wasn’t redirecting, but now everything is working as expected.

🎓 Tutorials

Rails is the Hot Way

by Jose Farias @fariastweets

A new-ish blog touching on doing things "the Rails way." So far, Hotwire-related articles include a file browser with Turbo Frames, loading frames on-demand, and separating concerns.

Learn Hotwire by Building a Forum

by Andrea Fomera @afomera

What better way to learn a framework than to build something real? This $99 course from Andrea covers authentication, discussions, notifications, and even real-time feedback. Will also cover Strada when (if?) it is released.

Remotely loading tabbed content with Ruby on Rails and Hotwire

by David Colby @davidcolbyatx

A great “getting started” tutorial to Hotwire from David which is also so practical you might be able to copy-paste the final product directly into your app.

Create an infinite scrolling blog roll in Rails with Hotwire

by Steve Polito @stevepolitodsgn

Bonus points here for a Rails module (to encourage code re-use) and Stimulus controller that automatically updates the URL path when new results are loaded. Oh, and some fun playing with JavaScript’s Mutation Observer!

🐙 Open source


by Dale Zak @dalezak

An ambitious project from Dale, Turbo-iOS-Base’s goal is to have a fully functioning hybrid iOS app entirely driven from your backend Rails app. Customize native tabs, design colors, native bar button items, and more without having to write any Swift code. I’ll be keeping a close eye on this one as it continues to improve.

Stimulus Use

A collection of composable behaviors for your Stimulus Controllers. Examples include observers (when the window is resized, when a key is pressed), optimizations (debouncing and throttling), animations, and more.

Spina CMS

by Daniel Tello @tello_io and Bram Jetten @BramJetten

A modern Ruby on Rails CMS without webpacker powered by Hotwire and Turbo. There’s also a live demo you can play with to get a feel for the admin interface.

📚 Reference

Better StimulusJS

by Julian Rubisch @julian_rubisch

An Opinionated Collection of StimulusJS Best Practices. Examples like ApplicationController is good but mixins are bad. Better ways to wire up event listeners, SOLID principles, tips on using <template> to restore Dom state… the list goes on.

🚀 Jumpstart iOS

Building Cross-Platform Apps has Gotten Easier. Jumpstart is One Reason Why

by William Kennedy @_williamkennedy

A love letter to the latest release from Jumpstart Rails: Jumpstart iOS. Turn your Rails app into an iOS app with a downloadable template for Xcode. Disclaimer - I built Jumpstart iOS with Chris Oliver of GoRails. From the article

Jumpstart iOS will enable tons of entrepreneurs to build cross-platform apps in a matter of weeks, if not days. You can have a Rails app up and running with an iPhone app ready to go in no time at all.”

Joe Masilotti
@joemasilotti joe@masilotti.com