@dialstack/sdk-dev / js/src/pure / registerComponents
Function: registerComponents()
TypeScript
function registerComponents(): Promise<void>;
Defined in: sdk/js/src/core/initialize-pure.ts:161
Register Web Components manually.
Call this when using the pure entry point, in a browser, before
dialstack.create(). Await it: registration happens through dynamic
imports, so a component created in the same tick may not be upgraded yet —
document.createElement would hand back an inert HTMLUnknownElement whose
setters silently do nothing.
Every tag in ComponentTagName is registered here. A tag missing from this list
is not a partial success: the React wrapper for it throws, because an
unregistered element cannot be driven.
Returns
Promise<void>
Example
TypeScript
import { loadDialstackAndInitialize, registerComponents } from '@dialstack/sdk-js/pure';
// Register components when ready (e.g., after hydration)
if (typeof window !== 'undefined') {
await registerComponents();
}