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

* @param {?object} hostParent
   * @param {?object} hostContainerInfo
   * @param {?object} context
   * @return {?string} Rendered markup to be inserted into the DOM.
   * @final
   * @internal
   */
  mountComponent: function(
    transaction,
    hostParent,
    hostContainerInfo,
    context
  ) {
    this._context = context;
    this._mountOrder = nextMountID++;
    this._hostParent = hostParent;
    this._hostContainerInfo = hostContainerInfo;
    var publicProps = this._currentElement.props;
    var publicContext = this._processContext(context);
    var Component = this._currentElement.type;
    
    var inst = this._constructComponent(publicProps, publicContext);
    var renderedElement;
    
    if (!shouldConstruct(Component) && (inst == null || inst.render == null)) {
      renderedElement = inst;
      warnIfInvalidElement(Component, renderedElement);
      invariant(
        inst === null ||
        inst === false ||