componentDidMount()

in libs/core/src/lib/renderer/react-content.ts [52:69]


  componentDidMount() {
    const element = ReactDOM.findDOMNode(this);
    if (this.props[CHILDREN_TO_APPEND_PROP]) {
      if (DEBUG) {
        console.warn(
          'ReactContent Component > componentDidMount > childrenToAppend:',
          this.props[CHILDREN_TO_APPEND_PROP]
        );
      }

      const hostElement = this.props.legacyRenderMode ? element : element.parentElement;

      // Only add children not already in the DOM
      this.props[CHILDREN_TO_APPEND_PROP].filter(child => !dom.isNodeInDOM(child)).forEach(child =>
        hostElement.appendChild(child)
      );
    }
  }