re: Class definition in React VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

πŸ‘† 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