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

var inst = this._instance;
    if (__DEV__) {
      ReactInstrumentation.debugTool.onBeginProcessingChildContext();
    }
    var childContext = inst.getChildContext && inst.getChildContext();
    if (__DEV__) {
      ReactInstrumentation.debugTool.onEndProcessingChildContext();
    }
    if (childContext) {
      invariant(
        typeof Component.childContextTypes === 'object',
        '%s.getChildContext(): childContextTypes must be defined in order to ' +
        'use getChildContext().',
        this.getName() || 'ReactCompositeComponent'
      );
      if (__DEV__) {
        this._checkContextTypes(
          Component.childContextTypes,
          childContext,
          ReactPropTypeLocations.childContext
        );
      }
      for (var name in childContext) {
        invariant(
          name in Component.childContextTypes,
          '%s.getChildContext(): key "%s" is not defined in childContextTypes.',
          this.getName() || 'ReactCompositeComponent',
          name
        );
      }