[]previous and next page

Extending ShadowJS

Build your own hooks, reactive primitives and control-flow components from the same extension APIs the built-ins use, with the same ownership, scheduling and diagnostics.

For agentsUpdated

After this page you can write a hook that behaves exactly like useSignal or useMemo, build a new reactive primitive on signal and computation nodes with proper disposal and dev diagnostics, write a control-flow component with the renderer building blocks Show, For and Portal are made of, and follow the ownership rules that keep extensions correct on the server and in the browser.