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 ?

enqueueReplaceState: function(publicInstance, completeState) {
    var internalInstance = getInternalInstanceReadyForUpdate(
      publicInstance,
      'replaceState'
    );
    if (!internalInstance) {
      return;
    }
    internalInstance._pendingStateQueue = [completeState];
    internalInstance._pendingReplaceState = true;
    enqueueUpdate(internalInstance);
  },
  /**
   * Sets a subset of the state. This only exists because _pendingState is
   * internal. This provides a merging strategy that is not available to deep
   * properties which is confusing. TODO: Expose pendingState or don't use it
   * during the merge.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {object} partialState Next partial state to be merged with state.
   * @internal
   */
  enqueueSetState: function(publicInstance, partialState) {
    if (__DEV__) {
      ReactInstrumentation.debugTool.onSetState();
      warning(
        partialState != null,
        'setState(...): You passed an undefined or null state object; ' +
        'instead, use forceUpdate().'
      );