# makeState

Creates hydrated Carousel state. activeId is required and paused defaults to true.

## Signatures

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



## Examples

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

const program = Effect.scoped(
  Effect.gen(function* () {
    const state = yield* Carousel.makeState({ activeId: "slide-1" });
    const collection = yield* Carousel.makeCollection();
    return { state: yield* state, collection: yield* collection };
  }),
);
```
