I use `ReactDOM.unstable_renderSubtreeIntoContainer` to render a portal.

``` javascript
class Modal extends React.Component {

componentDidMount() {
    this.node = document.createElement('div');
    document.body.appendChild(this.node);
    this.renderPortal(this.props);
}

componentWillReceiveProps(nextProps) {
    this.renderPortal(nextProps);
}

componentWillUnmount() {
    ReactDOM.unmountComponentAtNode(this.node);
    document.body.removeChild(this.node);
}

renderPortal = (props) => {
    renderSubtreeIntoContainer(this, <ModalPortal {...props} />, this.node);
}

render() {
    return null;
  }
}
```

In my root component:

``` javascript
class App extends React.Component {
    static childContextTypes = {
        highlightColor: React.PropTypes.object
    }

    getChildContext() {
        return {
            highlightColor: this.props.highlightColor
        }
    }

    ...
}
```

The context of root component will be updated and passed to children if  `this.props.highlightColor` is changed. This is right.
I can access the correct context in the `<ModalPortal/>` component in the first render.
And after that the context passed to  `<ModalPortal/>` **does not change any more** when the context of root component changed.
But I can access the correct context in the `<Modal/>`  every render.

what's wrong with my code ?

invariant(
      container.nodeType !== DOC_NODE_TYPE,
      'You\'re trying to render a component to the document but ' +
        'you didn\'t use server rendering. We can\'t do this ' +
        'without using server rendering due to cross-browser quirks. ' +
        'See ReactDOMServer.renderToString() for server rendering.'
    );
    if (transaction.useCreateElement) {
      while (container.lastChild) {
        container.removeChild(container.lastChild);
      }
      DOMLazyTree.insertTreeBefore(container, markup, null);
    } else {
      setInnerHTML(container, markup);
      ReactDOMComponentTree.precacheNode(instance, container.firstChild);
    }
    if (__DEV__) {
      var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild);
      if (hostNode._debugID !== 0) {
        ReactInstrumentation.debugTool.onHostOperation(
          hostNode._debugID,
          'mount',
          markup.toString()
        );
      }
    }
  },
};
module.exports = ReactMount;