Turbo Frames vs. Turbo Streams

Поділитися
Вставка
  • Опубліковано 23 лип 2024
  • And in this video, I'll explain the differences between Turbo Frames and Turbo Streams.
    🎥 Join my new Ruby on Rails Class here: bit.ly/3oGJ3wp
    Github Repository: github.com/mixandgo/turbo-fra...
    Step By Step Guide: bit.ly/3S7uv6v
    You can subscribe to the channel using this link: ua-cam.com/users/mixandgo?sub_...
    My website: mixandgo.com
    #rubyonrails #hotwire #react #reactjs #rails7

КОМЕНТАРІ • 41

  • @SebastianSastre
    @SebastianSastre 7 місяців тому

    Excellent, knowing this difference was muchly needed and you made it really accessible. Thanks!

  • @bradgarland6424
    @bradgarland6424 2 роки тому

    Thanks, concise and exactly what I needed as I was also a bit confused about which I should be using.

    • @mixandgo
      @mixandgo  2 роки тому

      You're welcome Brad

  • @FiendishSchmit
    @FiendishSchmit Рік тому

    Amazing! So useful, keep up great content 😊

  • @haroldpepete
    @haroldpepete Рік тому

    that is such a helpful video, i did have so clear with why frames or streams, but i have it clear right now thanks to you

    • @mixandgo
      @mixandgo  Рік тому

      I'm glad you like it ;)

  • @marcelonmoraes
    @marcelonmoraes Рік тому +1

    Great explanation about turbo frames and turbo streams, one of the best explanations. Thanks to share this content.

  • @DevBishwasBh
    @DevBishwasBh Рік тому +1

    That's a great piece of article, you're awesome. A simple chat app tutorial with devise and broadcasting, with the ability to edit/delete will be a great help. Specially, what I'll be achieving from that tutorial is, a way to access `current_user` within back-end and pass the context/tubro_streams accordingly, [basically not with client-side JS but with backend]

    • @mixandgo
      @mixandgo  Рік тому +2

      Thanks man. Not sure what you're after with the current user, but you might want to check the other videos on the Hotwire playlist.

  • @sidalidev
    @sidalidev Рік тому

    This made a lot more sense, thank you very much!

    • @mixandgo
      @mixandgo  Рік тому

      Happy to hear that 👍

  • @rdepaulabarbosa
    @rdepaulabarbosa 2 роки тому

    Great as usual. Thank you!

  • @Neurodav
    @Neurodav 10 місяців тому

    Great video ... helped me a lot conceptually!

    • @mixandgo
      @mixandgo  10 місяців тому

      I'm happy to hear that

  • @OscarOliverah
    @OscarOliverah 2 роки тому +1

    Reading Ruby Weekly's and find this! Awesome.

  • @user-uh6qb4mr5q
    @user-uh6qb4mr5q 11 місяців тому

    謝謝你的影片幫助了我很多,thank you

  • @ledockol
    @ledockol 2 роки тому

    Great! Thanks

  • @juliolinarezescobar
    @juliolinarezescobar Рік тому

    Awesome video!

  • @midda7
    @midda7 Рік тому

    Thanks!

  • @ricksmoke4748
    @ricksmoke4748 2 роки тому

    A very good "wrap your brain around it" explanation. Thanks!
    PS. Can you use an external websocket and turbo-streams to get data into the application also ?

    • @mixandgo
      @mixandgo  2 роки тому

      Haven't tried that yet. So, I'm not sure.

  • @kevkevships
    @kevkevships Рік тому

    Would really enjoy a slightly more comprehensive update. After using turbo frame with stimulus controllers we ran into several issues because the stimulus controllers aren't aware of the page changes. This means for example that stimulus controllers need to be nested within the frames to work properly

  • @karthikeyanak9460
    @karthikeyanak9460 2 роки тому +7

    For some reason the Ruby on Rails official documentation is not as good as other web frameworks. Plus books for RoR's are not up to date.

    • @mixandgo
      @mixandgo  2 роки тому +1

      Yup! That's right.
      This has been true for as long as I can remember. Especially for new tech. It gets better with time, but in the meantime, you've gotta figure it out yourself. Or subscribe to my channel 😉 😉

  • @ddd2283
    @ddd2283 Рік тому

    Can someone discover Reflexes ? One short video pls )))

    • @mixandgo
      @mixandgo  Рік тому

      Sure, who do I make the invoice to? :)

  • @tillcarlos664
    @tillcarlos664 2 роки тому

    You look very familiar. Are you famous in some other channel? Maybe it was tiktok... ;)

  • @switzerland
    @switzerland 2 роки тому

    I think I am cheating. I just wrapped turbo stream tags into my turbo frame response. The turbo frame loads flawlessly, detects the the turbo stream tags which themselves update other pages of the page. Nesting is the way to go. No need to op-in into action-cable🙃 Or you can nest turbo frame tags which results in more requests but also updates in multiple sections.

    • @mixandgo
      @mixandgo  2 роки тому

      That's cool, but you loose the caching benefit. And the lazy-loading one ;)

  • @laughingvampire7555
    @laughingvampire7555 5 місяців тому

    I don't understand the point of turbo-frame & turbo-streams, it looks messy compared to how it was done even with jQuery alone. HTMX & Alpine.js look a lot cleaner to me than hotwire.

    • @mixandgo
      @mixandgo  5 місяців тому

      Well the point is you ca improve an existing (non-hotwire) site without doing much work.
      You don't need to change the old HTML to make the new one more reactive.

  • @bitwise2832
    @bitwise2832 6 місяців тому

    This did not clear up anything...

  • @talhakhan4457
    @talhakhan4457 Рік тому

    Cezar,
    Whenever I run 'Turbo::StreamsChannel.broadcast_update_to("teststr", target: "content", html: "foo")
    It gives me:
    [ActionCable] Broadcasting to tester: "foo"
    => nil

    • @mixandgo
      @mixandgo  Рік тому

      That should be good. Are you not seeing the result?

    • @talhakhan4457
      @talhakhan4457 Рік тому

      @@mixandgo It should give the result as a 0, or 1.
      Although I figured it out later. It was the redis configuration in the cable.yml

    • @mixandgo
      @mixandgo  Рік тому

      @@talhakhan4457 well, yes the method just enqueues the job. And the Redis server needs to be started.