Skip to main content
Subscribe via RSS Feed

dom-chef - Build DOM Elements with JSX

1 min read

build-dom-elements-with-jsx-5fi/ cover_image: https://thepracticaldev.s3.amazonaws.com/i/pkajv39sn98rgfgdeotf.jpg#

I came across dom-chef while working on a PR for migrating Refined GitHub to TypeScript (WIP and something that is interesting on its own if you’re new to TypeScript).

At a quick first glance, I thought Refined GitHub was built with React, but as soon as I had that second sip of coffee, I realized it was just JS with some JSX in it.

The TLDR:

  • No API, JSX gets auto transformed into actual DOM elements
  • Protection from XSS injections
  • Partial SVG support
  • React-like props naming (including events)
  • Mix any DOM elements inside

This is definitely interesting if you’re a fan of JSX.

Check out the repository

GitHub link: https://github.com/vadimdemedes/dom-chef OpenGraph preview for https://github.com/vadimdemedes/dom-chef

Photo by Wyron A on Unsplash