made with esnextbin
Created
November 21, 2016 16:14
-
-
Save voronianski/f81cbfcb65f3bfbc0d1c5ccc3c748ca5 to your computer and use it in GitHub Desktop.
esnextbin sketch
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>ESNextbin Sketch</title> | |
<script src="https://unpkg.com/[email protected]/dist/jsx-create-element.js"></script> | |
</head> | |
<body> | |
<div id="app"></div> | |
</body> | |
</html> |
This file contains hidden or 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 jsx.createElement */ | |
const className = 'foobar'; | |
const hello = name => ( | |
<div className={className}> | |
<h1>Hello <span>{name}</span>!</h1> | |
</div> | |
); | |
jsx.render(hello('World'), document.getElementById('app')); |
This file contains hidden or 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
{ | |
"name": "esnextbin-sketch", | |
"version": "0.0.0" | |
} |
This file contains hidden or 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
'use strict'; | |
/** @jsx jsx.createElement */ | |
var className = 'foobar'; | |
var hello = function hello(name) { | |
return jsx.createElement( | |
'div', | |
{ className: className }, | |
jsx.createElement( | |
'h1', | |
null, | |
'Hello ', | |
jsx.createElement( | |
'span', | |
null, | |
name | |
), | |
'!' | |
) | |
); | |
}; | |
jsx.render(hello('World'), document.getElementById('app')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment