Skip to content

Instantly share code, notes, and snippets.

@mikaelbr
Created October 8, 2019 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikaelbr/1c597ccbe8db7f3102e7130fed8354f9 to your computer and use it in GitHub Desktop.
Save mikaelbr/1c597ccbe8db7f3102e7130fed8354f9 to your computer and use it in GitHub Desktop.
Code for blogpost "Using JSX for your own lightweight declarative library": https://medium.com/@mikaelbrevik/using-jsx-for-your-own-lightweight-declarative-library-a773d3796475
const h1 = <h1 id="myId">Hello, World</h1>;
// Outputs
const h1 = React.createElement(
"h1",
{
id: "myId"
},
"Hello, World"
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment