Genie Discord forum

Author Avataryakir12
8/23/2023, 8:37:13 AM

[EDIT} this works! I'd like one of the variables, imageurl, in the app to auto-update every s seconds.

Naively, this explains what I want but doesn't and it works!

baseurl = "/frame"
s = 0.5

@app begin

    @out imageurl = baseurl

    Timer(1; interval=s) do timer
        imageurl = string(baseurl, "#", Base.time_ns()) # add an (invalid) anchor to the imagepath in order to trigger a reload in the Quasar/Vue backend


The idea is that once a user navigates to the app's page, the URL to the image auto-refreshes every 0.5 seconds, triggering a reload in the client. No need for the user to press anything.