deepsourcestatus / test-repository

Avoid using setState in componentDidMount JS-0442
Performance
Major
8 months ago8 months 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  }