Skip to content

Clarify streams in readme #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jslag
Copy link

@jslag jslag commented Jun 5, 2025

While learning how to use Turbo Streams recently, I was confused by a few things in the README.

First, having the "Testing Turbo Stream Broadcasts" details immediately after the brief introduction to Streams made me think at first that the readme didn't have anything else to say about how to implement Streams, so the first commit moves those details into the existing "Testing" section. This should make the following "Installation" and "Usage" sections more obvious.

Second, I wasn't clear on what sorts of broadcasting turbo-rails supports -- only callbacks from models, or also code outside the model context? From what I've gathered, calling broadcast methods on Turbo::StreamsChannel, as in the added snippet, is a common practice, though I haven't seen official docs on that outside of the linked code comment.

If I'm wrong or missing anything around expected usage of Streams, happy to rework these changes accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant