Skip to content

Instantly share code, notes, and snippets.

@voronianski
Created November 21, 2016 16:14
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 voronianski/f81cbfcb65f3bfbc0d1c5ccc3c748ca5 to your computer and use it in GitHub Desktop.
Save voronianski/f81cbfcb65f3bfbc0d1c5ccc3c748ca5 to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<script src="https://unpkg.com/jsx-create-element@0.1.1/dist/jsx-create-element.js"></script>
</head>
<body>
<div id="app"></div>
</body>
</html>
/** @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'));
{
"name": "esnextbin-sketch",
"version": "0.0.0"
}
'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