Practice · Interview · Card 5
"Turbo Frames vs Turbo Streams?"
A favorite for Rails interviews in 2026. They sound similar; they do different things. The distinction is what the interviewer is listening for.
The question
"What's the difference between a Turbo Frame and a Turbo Stream, and when would you use each?"
Your job
Name what each one is, name what initiates the update, and give a concrete use case for each.
Take a moment. One initiates updates from the client. One is server-driven. Which is which, and what use case fits each?
The senior framing
A Turbo Frame is a region of the page that scopes navigation. Clicks and form submits inside it replace just that region, not the whole page. The client initiates the request; the server responds with HTML for the frame.
A Turbo Stream is a server-driven update. The server broadcasts an HTML fragment — append, prepend, replace, update, or remove — targeting elements by ID, either as part of a form response or over a WebSocket.
Pick by who initiates:
- Frames when the user clicks a link or submits a form and you want a specific region to update.
- Streams when something else (another user, a background job, a webhook) changes state that needs to show up live on every connected user's screen.
Bonus signal: mention Stimulus as the third piece — small JS controllers for behavior that doesn't need a server round-trip (sortable lists, modal toggles, debounced inputs).
Junior framings that don't land
- "Frames are for forms, Streams are for links." Wrong split. Both can be triggered by either; the difference is who initiates.
- "Frames are server-side; Streams are client-side." Both render server-side HTML. The difference isn't where rendering happens.
- "Frames are old; Streams replaced them." Both are current and useful. They cover different cases.
- "They're React components for Rails." Hotwire is explicitly not React. It's server-rendered HTML with minimal JS. Saying "components" signals you haven't used it.
What the rubric scores
- Both definitions, distinct. Frame = client-initiated region. Stream = server-pushed fragment.
- The "who initiates" axis. Naming this is the senior framing.
- One use case for each. "Frame for click-update-this-region. Stream for live notifications across users."
- Stimulus aware. Bonus: knowing it exists and what role it plays.
Theory
For the broader modern-stack framing, read Interview · The Modern Rails Stack.