So, I started this new project with create-react-app (it's running react v.16.13.1). I rewrote the base App component as a class, and I found that when the component is a function, like this:
function App() {
console.log('App (function)');
return 'App (function)';
}
the browser console prints out
App (function)
Great, thanks! But if the same App component is written as
class App extends React.Component {
render() {
console.log('App (class)');
return 'App (class)';
}
}
console writes
App (class)
App (class)