component creation

is there a difference between this

import React, { Component } from 'react';
class App extends Component{
render(){
return(
<div>
<h1>Hello World</h1>
</div>
);
}
}
export default App;

and this

class App extends react.component{
render(){
return(<div>
<h1>Hello World</h1>
</div>);
}
}

also what does “export default” statement above mean? is it the same as
document.query selector(#container)?

Hi Andy - the export statement plays an important role in signaling what part of your file other files can reference:

Queryselector is used to reference an element that exists in our HTML in JavaScript. This article goes into more detail on what role queryselector plays:

To answer your question about the code differences, they are both similar. React.Component and Component reference the same underlying Component implementation.

:slight_smile: