re: Class definition in React VIEW POST

TOP OF THREAD FULL DISCUSSION
re: 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.

class App extends React.Component {
  // not this.state but just state
  state = {
    count: 0
  };
  render() { ...  }
}
code of conduct - report abuse