Skip to content

isComponent

The API for isComponent(); a runtime type guard for Ornata component constructors.

import { isComponent } from 'ornata';
const { isComponent } = window.Ornata;
if (isComponent(value)) {
value.mount(root);
}

You will usually use isComponent() in framework internals, registries, or defensive bootstrap code.

It is especially useful when working with dynamic component maps or values from untyped boundaries.