From 157120eb649179794960a6fb7eea3a1530137a7e Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Wed, 23 Mar 2022 09:55:03 +1100 Subject: [PATCH] Chap03n -> Understanding and enabling strict mode --- QandA/frontend/src/App.tsx | 7 +++++++ QandA/frontend/src/index.tsx | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/QandA/frontend/src/App.tsx b/QandA/frontend/src/App.tsx index a53698a..ace2b8d 100644 --- a/QandA/frontend/src/App.tsx +++ b/QandA/frontend/src/App.tsx @@ -6,6 +6,7 @@ function App() { return (
+ logo

Edit src/App.tsx and save to reload. @@ -23,4 +24,10 @@ function App() { ); } +class ProblemComponent extends React.Component { + render() { + return

; + } +} + export default App; diff --git a/QandA/frontend/src/index.tsx b/QandA/frontend/src/index.tsx index ef2edf8..5834c74 100644 --- a/QandA/frontend/src/index.tsx +++ b/QandA/frontend/src/index.tsx @@ -8,10 +8,16 @@ ReactDOM.render( , - document.getElementById('root') + document.getElementById('root'), ); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals reportWebVitals(); + +class ProblemComponent extends React.Component { + render() { + return
; + } +}