Hi I’m new to observable and really enjoy it so far. I’ve made a dashboard which queries an api and displays data. I’d like to put it up on a monitor on the wall at work, but to do that it needs to automatically update with the latest data.
What is the idiomatic way to query the api for fresh data on an interval?
I could bake setInterval into the flow somewhere to handle the refresh “inside the cell” but I’m curious if there’s some easier way to do what is effectively re-running the cell (shift+enter behavior).
I’m sure that others will chime in as well — but I personally enjoy using asynchronous generators for this purpose.
And don’t let the fancy name scare you. What we’re really talking about here is a simple while loop that runs forever, waiting for a certain amount of time before proceeding to loop again.