2 ms·
$E is pretty close to React.createElement, which JSX's tags compile to https://reactjs.org/docs/react-without-jsx.html https://reactjs.org/docs/react-without-j
by ihuman 6y ago
$E is pretty close to React.createElement, which JSX's tags compile to
https://reactjs.org/docs/react-without-jsx.html https://reactjs.org/docs/react-without-jsx.html
- wolfgang42 6y agoI’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.)