Hello there, just have a small question that kind of prevents me from doing some toy applications and starting to grasp this SAM thing. When using functions to create the views (instead of templates or JSX, etc), how do define the event handlers? In the examples I have seen some stuff like
return '<button onclick=somefunction(somedata)>', but I don't see that going a long way: what if I don't have a reference (even within a namespace) in the global scope? Thanks.