Diagnostics: NO_OWNER_*
Code that runs outside every owner has nowhere to attach.
Code that runs outside every owner has nowhere to attach. ShadowJS warns once per code in development and carries on.
| Call outside an owner | Result | Code |
|---|---|---|
useEffect(...), onMount(...) |
the effect is created and runs, but nothing can dispose it | NO_OWNER_EFFECT |
onCleanup(fn) |
fn is dropped and never runs |
NO_OWNER_CLEANUP |
onError(handler) |
the handler is dropped | NO_OWNER_ERROR |
useId() |
throws ShadowError |
NO_OWNER_ID |
The fix is the same each time: create the node inside a component or inside createRoot, or restore the owner with runWithOwner.