Hacker News new | ask | show | jobs
by iudqnolq 627 days ago
I'm quite fond of a little helper like so:

    createElement({
        className: 'p-2 flex justify-end',
        contents: createElement({
          tag: 'img',
          src: '/os-logo-maps.svg'
        }),
      });
I got the idea from Lea Verou's blissfuljs. When you're creating a bunch of nested elements it comes in handy.
1 comments

That’s React without the JSX sugar.
The idea is older than react and react contains much more cruft (both wanted and unwanted).
Yes, and?