score:2

Classes in the context of React can be thought of as classes in most Object Oriented Programming language, they are a blueprint to create an object from. In order to let the language know how and what to do when we create it, it needs a constructor method. This constructor method is calling a special method called super() so that it calls the constructor of the class it is extending from, in this case FlareComponent.Controller

The method advance will be called to add to the captured walk time that the class is keepi track of.

One of the problems is that you are trying to set the state of the component directly instead of using setState https://reactjs.org/docs/react-component.html

I would highly recommend brushing up on React basics before you continue with this, it will really help you get the proper foundation you need.


Related Query

More Query from same tag