Stimulus Polling for Frontend No Refresh Updates | Ruby on Rails 7 Tutorial
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
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. :)
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.
hey I read the description hahahaha
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.
Thank you! Very usefull!
that's great bro
Hey Dean, great tutorial. Could you maybe at some point cover how to implement multiple tenancy in rails 7.