QuackatronHQ / Gigarepo

Avoid using setState in componentDidMount JS-0442
Performance
Major
a month ago2 years old
Do not use setState in componentDidMount
 9  componentDidMount() {
10    findDOMNode(this).scrollIntoView();
11    this.state.mode = this.props.userSettings.mode;
12    this.setState({13      mode: this.props.userSettings.mode,
14    });
15  }