[]previous and next page

Detached roots

createRoot attaches to the current owner by default: when that owner is disposed, the root goes with it.

For agentsUpdated

createRoot attaches to the current owner by default: when that owner is disposed, the root goes with it. Pass { detached: true } for a root that must outlive its creator (a cache, a global store, an overlay). A detached root still inherits context from where it was created, but is disposed only through its own dispose function.

If the callback of createRoot throws, the root is disposed and the error is rethrown to the caller.

The callback of createRoot runs untracked: reads inside it never subscribe the surrounding effect.