Genie Discord forum

Author Avatarmichaelfliegner
12/12/2022, 6:50:49 AM

Hi! Does the API contain alternative syntax for: push!(__model__)

Author Avatarabhimanyuaryan
12/12/2022, 2:53:59 PM

@michaelfliegner sorry where is this coming from? I have no context

Author Avatarmichaelfliegner
12/21/2022, 1:54:07 PM

the new api uses the symbol __model__ to denote the model state synched with the browser. before that you had to explicitly name the model and use that name in handlers to sync with the client. it's just a question of documentation and, say, syntactic sugar. ... wait a minute ... Should I try @push? 🤔

Author Avatarhhaensel
1/18/2023, 9:59:57 PM

It's not (yet) integrated. @push is a good proposal. We are currently developing support for x[!] = 3 instead of __model__.x[!] = 3 to make silent updating easier.