1
In that code:
class ShoppingList extends React.Component {
render() {
return (
<div className="shopping-list">
<h1>Shopping List for {this.props.name}</h1>
<ul>
<li>Instagram</li>
<li>WhatsApp</li>
<li>Oculus</li>
</ul>
</div>
);
}
}
Well, my doubt is:
React.Component is a class?
Render() is a method?
and this one:
class Square extends React.Component {
constructor(props) {
super(props);
this.state = {
value: null,
};
}
Constructor is a method?
The Props is a parameter??
And the super is a function??
These questions may seem silly but I am trying to understand as much as possible the structure of the language and framework.
I have read the documentation of both JS and React but I still get a little lost
Apart from the case of props (which I don’t quite know how it is passed because I don’t use Law), the answer is yes to all questions.
– bfavaretto
Yes for everyone... !!! studied well...
– novic