How to use the inferno-vnode-flags.VNodeFlags.ComponentUnknown function in inferno-vnode-flags

To help you get started, we’ve selected a few inferno-vnode-flags examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github infernojs / inferno / packages / inferno-mobx / src / observer.ts View on Github external
// Optimization: it might be more efficient to apply the mapper function *outside* the render method
      // (if the mapper is a function), that could avoid expensive(?) re-rendering of the injector component
      // See this test: 'using a custom injector is not too reactive' in inject.js
      const newProps = {};
      let key;

      for (key in props) {
        newProps[key] = props[key];
      }

      const additionalProps = grabStoresFn(context.mobxStores || {}, newProps, context) || {};
      for (key in additionalProps) {
        newProps[key] = additionalProps[key];
      }

      return createComponentVNode(VNodeFlags.ComponentUnknown, component, newProps, null, isStateless(component) ? null : this.storeRef);
    }
  }
github infernojs / inferno / packages / inferno-router / src / withRouter.ts View on Github external
render(routeComponentProps: IWithRouterProps) {
        return createComponentVNode(VNodeFlags.ComponentUnknown, Com, combineFrom(remainingProps, routeComponentProps), null, wrappedComponentRef);
      }
    });
github infernojs / inferno / packages / inferno-redux / src / components / connectAdvanced.ts View on Github external
public render() {
        const selector = this.selector;
        selector.shouldComponentUpdate = false;

        if (selector.error) {
          throw selector.error;
        } else {
          return normalizeProps(
            createComponentVNode(
              VNodeFlags.ComponentUnknown,
              WrappedComponent,
              this.addExtraProps(selector.props),
              null,
              withRef ? this.setWrappedInstance : null
            )
          );
        }
      }
    }