Réponse

constructor() {
super();
this.state = {color: "red"};
}

Colonne
Explication

class Car extends React.Component {
constructor() {
super();
this.state = {color: "red"};
}
render() {
return <h2>I am a Car!</h2>;
}
}

Question

Créer une fonction constructor dans le composant Car et lui ajouter une propriété color à red

Thématique