The code

``` javascript
class Comp extends React.Component {
  componentWillMount() {
    setTimeout(() => {
      this.setState({});
    });
  }

  render() {
    return <div onClick={() => {}} />;
  }
}

ReactDOMServer.renderToString(<Comp />);
```

produces errors:

> Warning: React can't find the root component node for data-reactid value `.0`. If you're seeing this message, it probably means that you've loaded two copies of React on the page. At this time, only a single copy of React can be loaded at a time.
> 
> Uncaught TypeError: Cannot read property 'firstChild' of undefined

But if I remove `onClick` handler the errors go away...

See demo: http://codepen.io/dened/pen/YyByYr

ExecutionEnvironment.canUseDOM = true;
      runTest();
    });
    it('should have the correct mounting behavior', function() {
      
      ExecutionEnvironment.canUseDOM = true;
      var mountCount = 0;
      var numClicks = 0;
      var TestComponent = React.createClass({
        componentDidMount: function() {
          mountCount++;
        },
        click: function() {
          numClicks++;
        },
        render: function() {
          return (
            <span ref="span" onClick={this.click}>Name: {this.props.name}</span>
          );
        },
      });
      var element = document.createElement('div');
      ReactDOM.render(<TestComponent />, element);
      var lastMarkup = element.innerHTML;
      
      
      ReactDOM.render(<TestComponent name="x" />, element);
      expect(mountCount).toEqual(1);