Re:Show HN: I built a 4kb alternative to React, Vue, etc for...
by lhorie on Thursday January 07, 2021 @08:01PM
(#25679982)
Right, sorry I think I wasn't clear. I'm wondering how one goes about something like this
Notice how both `a` and `b` are passed into `foo`. There are other possible permutations, such as passing indices or properties of items. I believe it's possible to access `b.bar` easily enough, but it wasn't clear how to access `a` or the index of `as.map` from inside the inner loop.
[ Parent
| on HN ]
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.