Genie Discord forum

I'm toying around to get a sense of how to manipulate data. I'm curious what's an efficient way to access reactive variables from JS. For "function1" is that correct? I'm basically doing: "Main_ReactiveModel.somevariable" from javascript.


Followup question. Inside of ui() how do I access the @out variables? println(text) doesn't work.

OIC. if I had to guess @handlers is where those @in/@out variables are exposed. "ui" is strictly rendering the state.

now I"m curious, if I have a "button" how do I have it fire callback in julia? Would I just create an @out variable and @click("var = !var") and then just watch the change to "var"?

I see an "onbutton" macro - not sure how to use. Just opened a new thread.

@app begin
@out msg = "elf"
end
function ui()
[ h1(:msg) ]
end