React Base Fiddle (JSX)
Starting point for creating JSFiddles with React.
HTML
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/[email protected]/dist/style-it-standalone.js"></script>
<div id="container">
<!-- This element's contents will be replaced with your component. -->
</div>
Babel + JSX
class App extends React.Component {
render() {
return (
<div>
<Style>
{`
body {
font-size: small;
font-family: arial;
}
h1 {
font-size: large;
}
h2 {
font-size: medium;
}
h3 {
font-size: small;
}
a {
color: blue;
}
a:hover {
color: aqua;
}
`}
</Style>
<header>
<h1>Main Header</h1>
</header>
<main>
<h2>Secondary Header</h2>
<p><a src="#">Test</a></p>
</main>
<footer>Copyright (c) My Company</footer>
</div>
);
}
}
ReactDOM.render(
<App />,
document.getElementById('container')
);