Chap03 -> Creating function-based components -> Creating mock data

This commit is contained in:
Jason Zhu 2022-03-24 00:02:35 +11:00
parent b11004925a
commit f0492816c5
2 changed files with 12 additions and 0 deletions

View File

@ -1,11 +1,13 @@
import React from 'react';
import { Header } from './Header';
import './App.css';
import { HomePage } from './HomePage';
function App() {
return (
<div className="App">
<Header />
<HomePage />
</div>
);
}

View File

@ -0,0 +1,10 @@
import React from 'react';
export const HomePage = () => (
<div>
<div>
<h2>Unanswered Questions</h2>
<button>Ask a question</button>
</div>
</div>
);