Chap03 -> Creating function-based components -> Creating a Header component
parent
157120eb64
commit
95cb876ef5
|
@ -1,25 +1,11 @@
|
|||
import React from 'react';
|
||||
import logo from './logo.svg';
|
||||
import { Header } from './Header';
|
||||
import './App.css';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<header className="App-header">
|
||||
<ProblemComponent />
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
<p>
|
||||
Edit <code>src/App.tsx</code> and save to reload.
|
||||
</p>
|
||||
<a
|
||||
className="App-link"
|
||||
href="https://reactjs.org"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Learn React
|
||||
</a>
|
||||
</header>
|
||||
<Header />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
import React from 'react';
|
||||
|
||||
export const Header = () => <div>header</div>;
|
Loading…
Reference in New Issue