Learning React from the docs and came across this example:
class Square extends React.Component {
constructor() {
super();
this.state = {
val
Worth adding that super() is short for superclass contructor, a concept from inheritance.
By default the class Square inherits the constructor from its superclass React.Component.
The inherited constructor can be overridden by declaring a new constructor() method.
If the intention is to extend rather than override the superclass constructor then it must be explicitly invoked using super().