Stimulus Polling for Frontend No Refresh Updates | Ruby on Rails 7 Tutorial

Sdílet
Vložit
  • čas přidán 28. 07. 2024
  • Sometimes, you just gotta check if the backend has an update every 5 seconds. Enter Stimulus polling for frontend, no refresh updates!
    Checkout my course(s) at: learn.deanin.com
    This Ruby on Rails 7 tutorial quickly covers setting up a stimulus component for polling the backend to get the latest data. Very pog stuff. I'm really tired, does anyone even read these descriptions lol
    Links:
    www.stimulus-components.com/d...
    Join this channel to help support these videos:
    / @deanin
    Follow me on social media:
    linktr.ee/deanin
    If you liked this video, please consider subscribing: t.co/RZ4EwP0F2a
    Repeat icon by Icons8
    #Deanin #Software #Programming

Komentáře • 7

  • @Deanin
    @Deanin  Před rokem +3

    While it's not going to be as popular as ChatGPT, it's still pretty useful! This one will let you request data from the backend in a loop, so that every N seconds you get the stuff you need.
    Not always necessary, but sometimes it is, and it's nice to consider it a solved problem. :)

    • @tombranson9341
      @tombranson9341 Před rokem

      I am neither criticizing the video nor the stimulus-component library, but at the end of the day, all that component does internally is use setInterval in the connect, and make sure to remove it in the disconnect callback. There are other small features, but this could easily have been created without an import.

  • @sabrinagomes5567
    @sabrinagomes5567 Před 8 měsíci +1

    hey I read the description hahahaha

  • @ledockol
    @ledockol Před rokem

    Thanks.
    This functionality can be used to update the weather widget, stock quotes, exchange rates and other data that we can't control, but this data should always be up to date.

  • @ddd2283
    @ddd2283 Před rokem

    Thank you! Very usefull!

  • @moviekapsula
    @moviekapsula Před rokem

    that's great bro

  • @nyaorobenjamin
    @nyaorobenjamin Před rokem

    Hey Dean, great tutorial. Could you maybe at some point cover how to implement multiple tenancy in rails 7.