Created
March 11, 2017 02:26
-
-
Save asolove/145f907a2dd91abb9f68ffc35d545fa0 to your computer and use it in GitHub Desktop.
JSX compilation before/after
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @jsx h **/ | |
import { render, h } from 'preact'; | |
render(<p size="5"><span>foo</span><i>bar</i></p>, document.body); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @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