# makeState

Creates hydrated Grid state. activeId defaults to null.

## Signatures

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



## Examples

```ts
import * as Effect from "effect/Effect";
import * as Grid from "@typed/ui/Grid";

const program = Effect.scoped(
  Effect.gen(function* () {
    const state = yield* Grid.makeState({});
    const collection = yield* Grid.makeCollection();
    return { state: yield* state, collection: yield* collection };
  }),
);
```
