Chap03n -> Understanding and enabling strict mode
parent
5166958107
commit
157120eb64
|
@ -6,6 +6,7 @@ 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.
|
||||
|
@ -23,4 +24,10 @@ function App() {
|
|||
);
|
||||
}
|
||||
|
||||
class ProblemComponent extends React.Component {
|
||||
render() {
|
||||
return <div ref="div" />;
|
||||
}
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
|
|
@ -8,10 +8,16 @@ ReactDOM.render(
|
|||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
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 <div ref="div" />;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue