Does a Class component in React need to have a constructor like the following example:
class App extends React.Component {
constructor() {
...
For further actions, you may consider blocking this person and/or reporting abuse
@kayut If you don't have child class means, you can use as second option like without constructor.
dev.to/kozakrisz/react---es6-trick...
👆 answers the question 👍
@kayut
And note that the
state
is initialized as a property outside of constructor,this.
should be dropped.