# RefSubject.Service

Creates a Context-backed RefSubject service facade and Layer constructors.

## Signatures

```ts
export declare function Service<Self, A, E = never>(): <const Id extends string>(id: Id) => RefSubject.Class<Self, Id, A, E>;
```

## Why

The returned class is simultaneously a service tag, a current-value Effect, an Fx source, and a
writable RefSubject facade. This lets consumers read, observe, and update renderer-independent
state without manually retrieving the underlying service from Context.

## Ownership and lifetime

Calling `Service` is pure. `layer` installs an existing scoped RefSubject; `make` constructs one
and installs it in a Layer. The Layer Scope owns the subject and its initializer subscription.
Reads and pushes expose the declared `E` channel; construction requirements remain on the Layer,
while consumers require only the generated `Self` service.
