Answer the question
In order to leave comments, you need to log in
Is it possible to explain in simple words, super, constructor inside the class?
ReactJS example:
class App extends Component{
constructor (props) {
super(props)
}
}
Thanks!
Answer the question
In order to leave comments, you need to log in
class App extends Component{ //вот тута мы говорим, что App - наследник от Component
constructor (props) { // конструктор App
super(props) //обязательно нужно сначала выполнить логику в конструкторе родителя
/* потом конструктор можно будет дополнить своей логикой */
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question