Chapter 5 - add components
This commit is contained in:
14
index.html
14
index.html
@@ -8,7 +8,19 @@
|
||||
<script type="text/jsx">
|
||||
const app = document.getElementById('app');
|
||||
|
||||
ReactDOM.render(<h1>Develop. Preview. Ship.</h1>, app);
|
||||
function Header () {
|
||||
return <h1>Develop. Preview. Ship.</h1>
|
||||
}
|
||||
|
||||
function HomePage() {
|
||||
return (
|
||||
<div>
|
||||
<Header />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
ReactDOM.render(<HomePage />, app);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user