You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because submit itself is a generator function, you can't just call it like a normal python function (e.g. submit()), instead you need to do yield from submit() this way the yields in submit run as expected
The text was updated successfully, but these errors were encountered:
I'd love to work on this and I'm familiar with generators.
Could you please describe what exactly you want to have in the docs, for example you mentioned multiple callback functions using the same code essentially, should there be examples of wrapper functions too.
https://google.github.io/mesop/guides/interactivity/
From chat:
yeah, this part is a bit confusing unless you're familiar with Python generators.
Essentially an event handler function e.g. on_click can be a regular function or a generator function (i.e. uses yield)
Sometimes, you may want to share logic between multiple event handler functions, so you'll extract it into a method like:
because submit itself is a generator function, you can't just call it like a normal python function (e.g. submit()), instead you need to do yield from submit() this way the yields in submit run as expected
The text was updated successfully, but these errors were encountered: