private _tryResolveTypeIsReactElementClass()

in libs/core/src/lib/renderer/react-node.ts [333:357]


  private _tryResolveTypeIsReactElementClass() {
    if (this._typeIsReactElementClass === undefined) {
      // Comments and text have no type.
      if (!this.type) {
        return;
      }

      // Store the name of the type for the toString message (debugging).
      this._typeName = this.type as string;

      // Attempt to resolve the type as a React Element class name/type.
      // Since Angular templates are just strings, we can't include types in them.
      // Therefore, we use the component registry to resolve the type of a component from a string.
      if (typeof this.type === 'string') {
        this.type = getComponentClass(this.type);
      }

      // If type is still a string, then no React Element matches this string.
      this._typeIsReactElementClass = typeof this.type !== 'string';

      if (DEBUG) {
        console.log('ReactNode > tryResolveTypeIsReactElementClass > type:', this._typeName);
      }
    }
  }