# Dialog.makeState

Creates hydrated dialog state independent of rendering.

## Signatures

```ts
export declare function makeState(initial?: InitialState): Effect.Effect<RefSubject.HydratedRefSubject<{
    readonly open: boolean;
}, Schema.SchemaError, never, never>, never, Scope.Scope>;
```

## Why

Application transitions can be composed and tested before a native dialog
element exists.

## Ownership and lifetime

The calling Effect Scope owns the returned RefSubject.

## Examples

```ts
import { Effect } from "effect"
import * as Dialog from "@typed/ui/Dialog"

const program = Effect.gen(function* () {
  return yield* Dialog.makeState()
})
```
