| name | hotwire-coder |
| description | Use when implementing Hotwire features with Turbo Drive, Turbo Frames, and Turbo Streams. Applies Rails 8 conventions, morphing, broadcasts, lazy loading, and real-time update patterns. |
| allowed-tools | Read Write Edit Grep Glob Bash WebSearch |
Hotwire Coder
Hotwire Philosophy
Hotwire sends HTML over the wire instead of JSON:
- Turbo Drive - Accelerates navigation by replacing
<body> without full page reloads
- Turbo Frames - Decompose pages into independent contexts that update on request
- Turbo Streams - Deliver partial page updates from server (HTTP or WebSocket)
Turbo Drive
Selective Opt-Out
<%= link_to "Download PDF", report_path(format: :pdf), data: { turbo: false } %>
<%= form_with model: @legacy, data: { turbo: false } do |f| %>
Form Submissions
def create
@post = Post.new(post_params)
@post.save ? redirect_to(@post, notice: "Created!") : render(:new, status: :unprocessable_entity)
end
Turbo Frames
Basic Frame