Week 37 - Solid Cable in Rails 8, Morphable Web Components, and more!
Check out the latest Hotwire Weekly for insights on Rails 8, upcoming talks, and new tools!
Welcome to Hotwire Weekly!
Welcome to another issue of Hotwire Weekly! Next week, Friendly.rb 2024 kicks off in Bucharest, September 18-19, featuring some Hotwire and Hotwire-adjacent talks:
- Make a Massively Multiplayer Ruby Game with Dragon Ruby and AnyCable - Julian Cheal
- Building for web and mobile in 2024: Production story and brighter future with Rails 8 - Hana Harencarova
- SQLite on Rails: Everything you need to know - Stephen Margheim
Enjoy the content and hope to see you at Friendly.rb! 🚀✨
📚 Articles, Tutorials, and Videos
The Rails Renaissance - Jack Rosa and Matt Polito explore the resurgence of Rails, particularly with the upcoming Rails 8 and Turbo 8. It highlights how Turbo, Stimulus, and Strada are transforming Rails into a more powerful and modern framework.
Solid Cable as default in Rails 8 - This Solid Cable PR by DHH makes Solid Cable the default Action Cable adapter in production in Rails 8, eliminating the need for Redis unless it's required for other purposes. Messages are stored in a table and polled for updates, offering comparable performance to Redis in most scenarios. Nick Pezza started solid_cable
and now it got promoted to the rails/solid_cable
repo.
Turbo Native iOS custom keyboard toolbar - Karl Entwistle's post explains how to create a custom keyboard toolbar in Turbo Native iOS. It walks through building a toolbar with input actions, such as “Done” or “Next,” which can improve user experience by providing more control over text input fields.
Designing Web Components For Morphing - Konnor Rogers' post explains how to design web components optimized for morphing, particularly when using Hotwire or similar frameworks. He discusses best practices for ensuring smooth transitions and state changes in the DOM.
Making Lit Components Morphable - In the follow-up article Konnor Rogers covers how to make Lit components morphable when using frameworks like Hotwire.
Create a Resizable Navigation with Stimulus - Rails Designer's article explains how to implement resizable elements in a Rails app using Stimulus.
Connected and Disconnected Target Callbacks with Stimulus - Rails Designer's article demonstrates how to manage Stimulus targets when they are connected or disconnected from the DOM.
How to self-publish a programming book - Philip I. Thomas interviewed Ayush Newatia about his "Rails and Hotwire Codex" book in his latest video.
Better Stimulus: Don't overuse connect()
- This article by Julian Rubisch on Better Stimulus advises against overusing the connect()
method in Stimulus controllers. While it's ideal for initializing third-party plugins and performing DOM cleanup, it's not suited for handling controller state or event listeners.
SupeRails - Turbo Native Playlist - Yaro Shmarov published a series on Turbo Native to learn to build mobile apps with Ruby on Rails SupeRails.com.
Livestream Recording: Hotrails.dev - Turbo Rails Tutorial - Learn Hotwire & Ruby on Rails - Carl Weis is going through the Hotrails.dev tutorial in a long-form livestream to report his experience using these tools while going through the tutorial.
🧰 Libraries and Tools
zed-stimulus - Stimulus LSP for the Zed Editor.
turbo_power - Custom Turbo Stream Actions power-pack for Turbo Streams.
🎉 Releases
turbo v8.0.6 - The speed of a single-page web application without having to write any JavaScript.
turbo-rails v2.0.7 - Turbo for Rails.
node-turbo v1.2.1 - A library for Node.js to assist with the server side of Turbo.
hotwire-livereload v1.4.1 - Automatically reload Hotwire Turbo when app files are modified.
anycable-rails v1.5.3 - AnyCable integration for Rails.
phlex v2.0.0.beta1 and v2.0.0.beta2 - A framework for building object-oriented views in Ruby.
phlex-rails v2.0.0.beta1 and v2.0.0.beta2 - Phlex integration for Rails.
tailwindcss-rails v2.7.4 - Tailwind CSS for Rails.
propshaft v1.0.0 - The new default asset pipeline for Rails 8.
Feel free to follow us on Twitter/X or on Mastodon!
See you next week!