Genie Discord forum
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Hello,
I'm building an app using the GenieFramework through VS code (is that still a good thing?).
I've a dynamic list of words, declared as an @out listwords
variable.
I would like to show it in the UI, updating the view each time the list changes. How do I do it?
My minimal setting is something like:
module App
# set up Genie development environment
using GenieFramework
@genietools
function get_keywords(uid)
words = #... do something
return words
end
@app begin
@in userid = 0
@out listkeywords = ["One word"]
@onchange userid begin
listkeywords = get_keywords(userid)
end
end
@page("/", "app.jl.html")
end
What should I insert in the app.jl.html to loop through the keywords and show them accordingly?
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
@recur
may be what you're looking for.
For example:
p("{{item}}", @recur(:"item in listkeywords"))