Mar 18, 2024: Check out the updated article for the release version
If you are already using Turbo 7, switching to Turbo 8, in all it’s morphing glory, is painless.
turbo-rails
gem to the latest beta, 2.0.0.pre.beta.1
as of Dec 22, 2023@hotwired/turbo-rails
in package.json to the latest beta, 8.0.0-beta.1
as of Dec 22, 2023<head>
<!-- other head content -->
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
<%= content_for :head %>
</head>
This will globally enable the morphing strategy for your application. With this running (and tested), what’s your next step? Conduct an audit of all your Turbo Streams templates because you may find that most of them can be safely removed!