Genie Discord forum

Author AvatarMonty Hall
3/22/2023, 11:54:45 PM

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.

Author AvatarMonty Hall
3/23/2023, 12:04:49 AM

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

Author AvatarMonty Hall
3/23/2023, 12:50:56 AM

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

Author AvatarMonty Hall
3/23/2023, 12:53:49 AM

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"?

Author AvatarMonty Hall
3/23/2023, 1:09:58 AM

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

Author Avatarabhimanyuaryan
3/23/2023, 7:02:05 AM
@app begin
@out msg = "elf"
end

function ui()
   [ h1(:msg) ]
end