See this example: https://github.com/facebook/react/issues/11508#issuecomment-345464797.

I think it probably reflects a misunderstanding of how props and state work, and we should detect and warn if we see this.
state = {
        stateField: this.props.valueToUseInitially,
      };
      componentDidMount() {
        this.setState({stateField: this.props.valueToUseInOnDOMReady});
      }
      render() {
        return <div />;
      }
    }
    let instance = (
      <SetStateInComponentDidMount
        valueToUseInitially="hello"
        valueToUseInOnDOMReady="goodbye"
      />
    );
    instance = ReactTestUtils.renderIntoDocument(instance);
    expect(instance.state.stateField).toBe('goodbye');
  });
  it('should call nested legacy lifecycle methods in the right order', () => {
    let log;
    const logger = function(msg) {
      return function() {
        
        log.push(msg);
        return true;
      };
    };
    class Outer extends React.Component {