mountWidget utility mounts your React widget into the #root element provided by the host runtime. It is the standard entrypoint for widget bundles.
In development, it also installs a window.openai logging proxy to help debug Apps SDK method calls.
Basic usage
Parameters
component
Behavior
- Requires a DOM element with id
root; throws if it is missing. - Reuses a single React root instance across repeated calls.
- Wraps rendering in
StrictMode.