Accessing state before super(props) in a class component
Understanding super(props) and State Initialization in Class Components A common React anti-pattern is trying to access this.state before calling super(props) in a class component constructor. Here’s what you need to….