News for hackers. Stuff that matters.
Re:Show HN: I built a 4kb alternative to React, Vue, etc for... by defx on Thursday January 07, 2021 @08:19PM (#25680163)
see the comment above "RE: #" concerning the index. synergy doesn't provide means for you to pass custom arguments into the event handlers, but the event target and the datum provide context of the loop and the handlers "this" is the viewmodel itself.
Re:Show HN: I built a 4kb alternative to React, Vue, etc for... by lhorie on Thursday January 07, 2021 @08:24PM (#25680204)
So then one would do `function foo(e, b, a) {...}` to access `a`?
Re:Show HN: I built a 4kb alternative to React, Vue, etc for... by defx on Friday January 08, 2021 @05:16AM (#25683253)
Apologies for the late reply, finally I had to get some sleep! No, you only get the datum for the loop from which the event is raised.