# Collection.unregister

Removes every registered item with the supplied id and retains the remaining order.

## Signatures

```ts
export declare function unregister<Value, Element extends object, E, R>(collection: RefSubject.RefSubject<State<Value, Element>, E, R>, id: string): Effect.Effect<void, E, R>;
```

## Why

The operation exposes Collection's transition directly so callers can compose it in Effect
programs and native event handlers.

## Ownership and lifetime

The returned Effect performs the update or DOM side effect only when run, preserves the declared
error and service channels, and retains no resources after completion.

## Example

Import with `import { unregister } from "@typed/ui/Collection";` Extend the [Collection.makeState
runnable setup](https://tylors.github.io/typed/reference/symbols/QHR5cGVkL3VpL0NvbGxlY3Rpb24jbWFrZVN0YXRl/). Inside the linked Effect
program first register `"save"`, run `yield* unregister(collection, "save")`, then read the
collection to observe that only the matching id was removed.
