hotwired / turbo-site

turbo.hotwired.dev web site
83 stars 101 forks source link

Update lead paragraph about turbo streams #176

Closed Intrepidd closed 7 months ago

Intrepidd commented 7 months ago

Following this invitation from @dhh : https://twitter.com/dhh/status/1762272824864162101

I feel that the way turbo streams are presented is a bit misleading for newcomers, who will instantly associate it with websockets, when in reality the means of transportation is not the first thing you want to understand about it. I think the naming (streams vs something like action) is also a part of this confusion but this is another story.

Starting small, here is a suggestion to reword a bit the first paragraph, to display that they can be used in both sync and async scenarios, and to try and provide examples.

I'm not 100% happy about my sync example, as most of the use cases we already know for sync turbo streams can be replaced with morphing (although requiring more bandwidth as the whole page is sent)

Maybe we can find a different example that does not work in a morphing scenario, maybe something that includes some kind of state that is not present in the usual page load such as a toast message, etc.

afcapel commented 7 months ago

Thanks @Intrepidd 🙏