News for hackers. Stuff that matters.
Re:A little bit of plain JavaScript can do a lot by ihuman on Sunday June 21, 2020 @12:45AM (#23589832)
$E is pretty close to React.createElement, which JSX's tags compile to

https://reactjs.org/docs/react-without-jsx.html

Re:A little bit of plain JavaScript can do a lot by wolfgang42 on Sunday June 21, 2020 @01:14AM (#23589991)
I’m not surprised by the convergent evolution—it’s the obvious API for creating elements. (My earliest versions of $E had arguments (tag, kids, fn) and would call fn(elem) so it could perform arbitrary modifications on the node, but I eventually realized that all I ever did was set properties and it was silly to have an entire lambda just for that.)