Last active
March 25, 2020 14:11
-
-
Save jtrussell/1d9b5dbb7a8a70583910456b5f67239b to your computer and use it in GitHub Desktop.
React boilerplate for jsbin
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"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<!-- uncomment for local dev --> | |
<!-- | |
<link rel="stylesheet/less" type="text/css" href="main.less"> | |
--> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react-with-addons.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react-dom.js"></script> | |
<!-- Uncomment for local dev --> | |
<!-- | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.15.0/babel.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/less.js/2.7.1/less.js"></script> | |
<script src="main.jsx" type="text/babel"></script> | |
--> | |
</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
class Greeter extends React.Component { | |
render() { | |
return ( | |
<p className="greeter"> | |
Hello, {this.props.moniker}! | |
</p> | |
) | |
} | |
} | |
ReactDOM.render( | |
<Greeter moniker="World" />, | |
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
.greeter { | |
border: 1px solid red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A minimal template for working with React in jsbin:
If local development is more your speed: