build/web/c0.js
function(id) {
    var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id);
    var container = containersByReactRootID[reactRootID];

    if ("production" !== process.env.NODE_ENV) {
      var rootElement = rootElementsByReactRootID[reactRootID];
      if (rootElement && rootElement.parentNode !== container) {
        ("production" !== process.env.NODE_ENV ? invariant(
          // Call internalGetID here because getID calls isValid which calls
          // findReactContainerForID (this function).
          internalGetID(rootElement) === reactRootID,
          'ReactMount: Root element ID differed from reactRootID.'
        ) : invariant(// Call internalGetID here because getID calls isValid which calls
        // findReactContainerForID (this function).
        internalGetID(rootElement) === reactRootID));

        var containerChild = container.firstChild;
        if (containerChild &&
            reactRootID === internalGetID(containerChild)) {
          // If the container has a new child with the same ID as the old
          // root element, then rootElementsByReactRootID[reactRootID] is
          // just stale and needs to be updated. The case that deserves a
          // warning is when the container is empty.
          rootElementsByReactRootID[reactRootID] = containerChild;
        } else {
          ("production" !== process.env.NODE_ENV ? warning(
            false,
            'ReactMount: Root element has been removed from its original ' +
            'container. New container:', rootElement.parentNode
          ) : null);
        }
      }
    }

    return container;
  }
function(id) {
    var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id);
    var container = containersByReactRootID[reactRootID];

    if ("production" !== process.env.NODE_ENV) {
      var rootElement = rootElementsByReactRootID[reactRootID];
      if (rootElement && rootElement.parentNode !== container) {
        ("production" !== process.env.NODE_ENV ? invariant(
          // Call internalGetID here because getID calls isValid which calls
          // findReactContainerForID (this function).
          internalGetID(rootElement) === reactRootID,
          'ReactMount: Root element ID differed from reactRootID.'
        ) : invariant(// Call internalGetID here because getID calls isValid which calls
        // findReactContainerForID (this function).
        internalGetID(rootElement) === reactRootID));

        var containerChild = container.firstChild;
        if (containerChild &&
            reactRootID === internalGetID(containerChild)) {
          // If the container has a new child with the same ID as the old
          // root element, then rootElementsByReactRootID[reactRootID] is
          // just stale and needs to be updated. The case that deserves a
          // warning is when the container is empty.
          rootElementsByReactRootID[reactRootID] = containerChild;
        } else {
          ("production" !== process.env.NODE_ENV ? warning(
            false,
            'ReactMount: Root element has been removed from its original ' +
            'container. New container:', rootElement.parentNode
          ) : null);
        }
      }
    }

    return container;
  }
function ( id ) { var reactRootID = ReactInstanceHandles . getReactRootIDFromNodeID ( id ) ; var container = containersByReactRootID [ reactRootID ] ; if ( "production" !== process . env . NODE_ENV ) { var rootElement = rootElementsByReactRootID [ reactRootID ] ; if ( rootElement && rootElement . parentNode !== container ) { ( "production" !== process . env . NODE_ENV ? invariant ( // Call internalGetID here because getID calls isValid which calls // findReactContainerForID (this function). internalGetID ( rootElement ) === reactRootID , 'ReactMount: Root element ID differed from reactRootID.' ) : invariant ( // Call internalGetID here because getID calls isValid which calls // findReactContainerForID (this function). internalGetID ( rootElement ) === reactRootID ) ) ; var containerChild = container . firstChild ; if ( containerChild && reactRootID === internalGetID ( containerChild ) ) { // If the container has a new child with the same ID as the old // root element, then rootElementsByReactRootID[reactRootID] is // just stale and needs to be updated. The case that deserves a // warning is when the container is empty. rootElementsByReactRootID [ reactRootID ] = containerChild ; } else { ( "production" !== process . env . NODE_ENV ? warning ( false , 'ReactMount: Root element has been removed from its original ' + 'container. New container:' , rootElement . parentNode ) : null ) ; } } } return container ; }
Finds the container DOM element that contains React component to which the
supplied DOM `id` belongs.

@param {string} id The ID of an element rendered by a React component.
@return {?DOMElement} DOM element that contains the `id`.
Finds the container DOM element that contains React component to which the supplied DOM id belongs .