function isValid(node, id) {
  if (node) {
    ("production" !== process.env.NODE_ENV ? invariant(
      internalGetID(node) === id,
      'ReactMount: Unexpected modification of `%s`',
      ATTR_NAME
    ) : invariant(internalGetID(node) === id));

    var container = ReactMount.findReactContainerForID(id);
    if (container && containsNode(container, node)) {
      return true;
    }
  }

  return false;
}
Take a component that's already mounted into the DOM and replace its props
@param {ReactComponent} prevComponent component instance already in the DOM
@param {ReactComponent} nextComponent component instance to render
@param {DOMElement} container container to render into
@param {?function} callback function triggered on completion