Componentize header
This commit is contained in:
@@ -6,9 +6,14 @@
|
||||
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
|
||||
<script type="text/jsx">
|
||||
const app = document.getElementById('app');
|
||||
|
||||
function Header() {
|
||||
return(<h1>Fart man approaches...</h1>);
|
||||
}
|
||||
|
||||
const root = ReactDOM.createRoot(app);
|
||||
root.render(<>
|
||||
<h1>Fart man approaches...</h1>
|
||||
<Header />
|
||||
<p>Will this controversial figure finally cause the downfall of the town? Sally Smith from town center says that she can already smell trouble brewing but other members of the town beleave the imminent winds of change will revitalize the towns central business district.</p>
|
||||
<a href="#">Read more...</a>
|
||||
</>);
|
||||
|
||||
Reference in New Issue
Block a user