# makeState

Creates hydrated disclosure state.

## Signatures

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

## Why

Applications can own and test open-state transitions independently of UI.

## Ownership and lifetime

The calling Effect Scope owns the returned RefSubject.

## Examples

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

const program = Effect.gen(function* () {
  return yield* Disclosure.makeState({ open: true })
})
```
