From 95cb876ef5ea4bbec30cb81a1d7daf4e9167689a Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Wed, 23 Mar 2022 22:55:22 +1100 Subject: [PATCH] Chap03 -> Creating function-based components -> Creating a Header component --- QandA/frontend/src/App.tsx | 18 ++---------------- QandA/frontend/src/Header.tsx | 3 +++ 2 files changed, 5 insertions(+), 16 deletions(-) create mode 100644 QandA/frontend/src/Header.tsx diff --git a/QandA/frontend/src/App.tsx b/QandA/frontend/src/App.tsx index ace2b8d..c534f82 100644 --- a/QandA/frontend/src/App.tsx +++ b/QandA/frontend/src/App.tsx @@ -1,25 +1,11 @@ import React from 'react'; -import logo from './logo.svg'; +import { Header } from './Header'; import './App.css'; function App() { return (
-
- - logo -

- Edit src/App.tsx and save to reload. -

- - Learn React - -
+
); } diff --git a/QandA/frontend/src/Header.tsx b/QandA/frontend/src/Header.tsx new file mode 100644 index 0000000..77f1a64 --- /dev/null +++ b/QandA/frontend/src/Header.tsx @@ -0,0 +1,3 @@ +import React from 'react'; + +export const Header = () =>
header
;