made with esnextbin
Last active
February 3, 2016 19:47
-
-
Save jfsiii/35dabaa253a4c0a60add 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>ESNextbin Sketch</title> | |
<!-- put additional styles and scripts here --> | |
</head> | |
<body> | |
<!-- put markup and other contents here --> | |
<div id="react-root"></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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
const App = ({ title }) => { | |
return ( | |
<div> | |
<h1>{title}</h1> | |
</div> | |
); | |
}; | |
ReactDOM.render( | |
<App title="Babel.js REPL + import NPM modules = http://esnextb.in" />, | |
document.getElementById('react-root') | |
); |
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": "jfsiii-esnextbin-sketch", | |
"version": "0.0.0", | |
"dependencies": { | |
"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 _react = require('react'); | |
var _react2 = _interopRequireDefault(_react); | |
var _reactDom = require('react-dom'); | |
var _reactDom2 = _interopRequireDefault(_reactDom); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var App = function App(_ref) { | |
var title = _ref.title; | |
return _react2.default.createElement( | |
'div', | |
null, | |
_react2.default.createElement( | |
'h1', | |
null, | |
title | |
) | |
); | |
}; | |
_reactDom2.default.render(_react2.default.createElement(App, { title: 'Babel.js REPL + import NPM modules = http://esnextb.in' }), document.getElementById('react-root')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment