Skip to content

Instantly share code, notes, and snippets.

@asolove
Created March 11, 2017 02:26
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 asolove/145f907a2dd91abb9f68ffc35d545fa0 to your computer and use it in GitHub Desktop.
Save asolove/145f907a2dd91abb9f68ffc35d545fa0 to your computer and use it in GitHub Desktop.
JSX compilation before/after
/** @jsx h **/
import { render, h } from 'preact';
render(<p size="5"><span>foo</span><i>bar</i></p>, document.body);
/** @jsx h **/
import { render, h } from 'preact';
render(h(
"p",
{ size: "5" },
h(
"span",
null,
"foo"
),
h(
"i",
null,
"bar"
)
), document.body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment