Genie Discord forum

Author AvatarMordegai
8/29/2023, 7:17:54 AM

Apparently, when I write something like:

@in var = 2
@in another_var = var

I get a 'var undefined' error. Is there a way around this? Otherwise I am forced to duplicate code in some cases, which can easily lead to errors should that code be changed.

Author AvatarMordegai
8/29/2023, 8:00:44 AM

Solved it! Figured out I need to declare the variable OUTSIDE of the @app macro and then use it in the @in and @out macros.

Author AvatarPere
8/29/2023, 8:20:46 AM

Yep! reactive variables do not actually exist until the page is loaded, so they cannot be used to initialize others.