made with esnextbin
Last active
January 4, 2017 00:54
-
-
Save tawanorg/863528ef886b710b644c36bbe187146d 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>ReactJS</title> | |
</head> | |
<body> | |
<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
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import { bindActionCreators } from 'redux' | |
import { Provider } from 'react-redux' | |
import { IndexRoute, Router, Route, Link, browserHistory } from 'react-router' | |
const Dashboard = React.createClass({ | |
render() { | |
return <div>Welcome to the app!</div> | |
} | |
}) | |
ReactDOM.render( | |
<Provider store={stores}> | |
<Dashboard /> | |
</Provider>, | |
document.getElementById('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": "esnextbin-sketch", | |
"version": "0.0.0", | |
"dependencies": { | |
"react": "0.14.7", | |
"react-dom": "0.14.7", | |
"redux": "3.6.0", | |
"react-redux": "5.0.1", | |
"react-router": "1.0.0-beta1" | |
} | |
} |
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); | |
var _redux = require('redux'); | |
var _reactRedux = require('react-redux'); | |
var _reactRouter = require('react-router'); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var Dashboard = _react2.default.createClass({ | |
displayName: 'Dashboard', | |
render: function render() { | |
return _react2.default.createElement( | |
'div', | |
null, | |
'Welcome to the app!' | |
); | |
} | |
}); | |
_reactDom2.default.render(_react2.default.createElement( | |
_reactRedux.Provider, | |
{ store: stores }, | |
_react2.default.createElement(Dashboard, null) | |
), document.getElementById('root')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment