<div id="root"></div>
$gray: #ccc; body { background: $gray; margin: 0; padding: 1rem; } .module { background: white; padding: 1rem; border-radius: 4px; border: 1px solid #999; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25); h1 { margin: 0 0 1rem 0; } }
class Welcome extends React.Component { render() { return <div class="module"> <h1> Hello, {this.props.name} </h1> <p>It's a good day to build websites.</p> </div>; } } ReactDOM.render( <Welcome name="Chris"></Welcome>, document.getElementById('root') );