<div id="app">
</app>
body {
background: #333;
color: white;
}
/*
Example for React component and Element
*/
class Dashboard extends React.Component {
render() {
const element = <h1>I am an element in React!</h1>;
return (
<div>
{element}
<h2>Dashboard is the React component returning an element.</h2>
</div>
);
}
}
/*
* Render the above component into the div#app
*/
React.render(<Dashboard />, document.getElementById("app"));
View Compiled
This Pen doesn't use any external CSS resources.