Learning React from the docs and came across this example:
class Square extends React.Component { constructor() { super(); this.state = { val
To use this keyword we should use the super keyword before it. Why? super is used to call the parent class's constructor.
this
super
constructor
Now why do we need to call the parent's constructor? The answer is to initialize the properties values which we are referring through this keyword.