made with esnextbin
Created
February 4, 2016 20:35
-
-
Save crisberrios/4ab2f6726fbf09e1652f to your computer and use it in GitHub Desktop.
esnextbin sketch
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>ESNext Bin Sketch</title> | |
<!-- put additional styles and scripts here --> | |
</head> | |
<body> | |
<!-- put markup and other contents here --> | |
<div id="app"></div> | |
</body> | |
</html> |
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
// write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
let React = require('react'); | |
let ReactDOM = require('react-dom'); | |
const Hello = ({children, ...props}) => <div {...props}>Hello {children}</div>; | |
ReactDOM.render(<Hello>World</Hello>, document.getElementById('app')); |
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
{ | |
"name": "esnextbin-sketch", | |
"version": "0.0.0", | |
"dependencies": { | |
"babel-runtime": "6.3.19", | |
"react": "0.14.7", | |
"react-dom": "0.14.7" | |
} | |
} |
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
'use strict'; | |
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties'); | |
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
// write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
var React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var Hello = function Hello(_ref) { | |
var children = _ref.children; | |
var props = (0, _objectWithoutProperties3.default)(_ref, ['children']); | |
return React.createElement( | |
'div', | |
props, | |
'Hello ', | |
children | |
); | |
}; | |
ReactDOM.render(React.createElement( | |
Hello, | |
null, | |
'World' | |
), document.getElementById('app')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment