⚡️ Hotwire dev newsletter - October 2022 edition

Turbo (Native), Stimulus, and Strada articles, code, courses, and more. Plus exclusive insights into how I build Turbo Native apps. Delivered monthly.

Welcome back to the October edition of the ⚡️ Hotwire dev newsletter!

Earlier this month I spoke at the Rails SaaS conference in Los Angeles. I met a ton of folks and was able to talk about a passion of mine: junior Rails developers. The conference was one of the most professional, engaging, and personal events I’ve ever been to.

A huge shout out and thank you to Andrew Culver for organizing this! I’ll be aggressively refreshing the page waiting for tickets to go on sale next year.

This month we have a guide to creating custom Turbo Stream actions, multiple pieces on using View Components in modern Rails apps, how to minify your Tailwind CSS in production, and more.

Also, I’m officially announcing my Turbo Native workshop! More info in the link below.

👩‍🎓 Tutorials

Turbo 7.2: A guide to Custom Turbo Stream Actions

by Marco Roth @marcoroth_

Turbo 7.2 introduced the ability to add new actions outside of the default 7. Marco walks through adding a simple action to log messages to the console. Then he builds out adding a toast message via custom action step-by-step. I especially like the custom helper with sane defaults so you can customize the toast as much (or as little) as you want.

Combined Mentions with ActionText

by Andrea Fomera @afomera

Andrea walks through adding @ mention support to an ActionText field powered by Trix. She uses Tribute for the heavy lifting but there is still quite a bit of configuration to make it work and look nice. The best part is that she starts from rails new so you can follow along without any existing code. Don’t miss part 2 covering saved replies and emojis. 🥳

📰 Articles

ViewComponent in the Wild: building modern Rails frontends

by Evil Martians @evilmartians

The martians are at it again! This time Alexander and Travis explore effective ways of using View Components in growing Rails applications. Skip the beginning if you are familiar because there are some gems hidden towards the end. Like when and how to use component slots, atomic components, and some thoughts on querying.

Minify production CSS via cssnano

by Andrew Mason @andrewmcodes

Andrew was kind enough to submit this PR to RailsDevs earlier this week. It reduced the production CSS output from 88kb to 67kb – over 20kb savings! And the change is contained to only two configuration files. I encourage anyone using Tailwind CSS in their Rails app to apply the same – it’s recommended by Tailwind CSS.

The RailsDevs redesign begins

by Joe Masilotti @joemasilotti

RailsDevs is getting a redesign! I worked with a designer to rework the visual branding including new colors. Jacob Daddario is kicking off the development work to apply the changes page-by-page. This Twitter thread documents our approach of a feature flag and request variants to avoid a long running branch. It’s heavily inspired by Ari Summer’s article on the same.

🎥 Videos

18 months of using Hotwire and View Component in production

by Yaroslav Shmarov @yarotheslav

A video from the wroclove.rb conference in Poland this year. Yaroslav walks through his team’s experience after converting their Rails app from React to Hotwire. He touches on View Components, form inputs (and multi-step forms!), infinite pagination, and snapshot testing.

📚 Courses and workshops

Learn Hotwire course from Mix & Go

by Cezar Halmagean (Mix & Go) @chalmagean

Cezar’s course officially launched! You might know him from his 5-minute Hotwire video tutorials on the Mix & Go YouTube channel. This course covers Streams, Drives, Frames, and Stimulus JS along with a minimalistic Instagram clone project. The course is currently 40% off during the launch.

The Turbo Native workshop

by Joe Masilotti @joemasilotti

It’s finally happening! I’m running a 3-hour Turbo Native workshop in December. You’ll learn how to use the native iOS Turbo wrapper to build high-fidelity hybrid apps with native navigation. Expect lectures followed by hands-on coding prompts with peer review. All followed up by a big Q&A session. Seating is limited but fill out this form and you’ll be the first to get all the details.

🎟 Conferences

BridgetownConf 2022

by Bridgetown @bridgetownrb

A free, one-day conference about everyone’s favorite static progressive site generator, Bridgetown! The speaker list includes Jared White (the creator of Bridgetown), Andrew Mason, Adrian Valenzuela, and Ayush Newatia. This event is perfect for someone who is curious about Bridgetown or wants to see what it can do.

Thanks,
Joe Masilotti
@joemasilotti joe@masilotti.com