made with esnextbin
Last active
November 29, 2016 05:25
-
-
Save mfrohberg/d3d71d74442278f97037e53f786c1a53 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> | |
<!-- put additional styles and scripts here --> | |
</head> | |
<body> | |
<div id="app"></div> | |
<!-- put markup and other contents here --> | |
</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
// write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
import * as React from 'react'; | |
import * as ReactDOM from 'react-dom'; | |
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider' | |
const App = () => ( | |
<MuiThemeProvider> | |
<h1>Hello</h1> | |
</MuiThemeProvider> | |
); | |
ReactDOM.render( | |
<App />, | |
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", | |
"dependencies": { | |
"react": "15.3.2", | |
"react-dom": "15.3.2", | |
"material-ui": "0.16.4" | |
} | |
} |
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'; | |
var _react = require('react'); | |
var React = _interopRequireWildcard(_react); | |
var _reactDom = require('react-dom'); | |
var ReactDOM = _interopRequireWildcard(_reactDom); | |
var _MuiThemeProvider = require('material-ui/styles/MuiThemeProvider'); | |
var _MuiThemeProvider2 = _interopRequireDefault(_MuiThemeProvider); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | |
var App = function App() { | |
return React.createElement( | |
_MuiThemeProvider2.default, | |
null, | |
React.createElement( | |
'h1', | |
null, | |
'Hello' | |
) | |
); | |
}; // write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
ReactDOM.render(React.createElement(App, null), document.getElementById('app')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment