From 499e1e174b2a61eadf359f2994adf34f457dea22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Fri, 24 Oct 2025 00:48:21 +0200 Subject: [PATCH] Fix --- packages/example/src/todo/Todo.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/example/src/todo/Todo.tsx b/packages/example/src/todo/Todo.tsx index d6c6cab..556ba46 100644 --- a/packages/example/src/todo/Todo.tsx +++ b/packages/example/src/todo/Todo.tsx @@ -41,7 +41,7 @@ export class Todo extends Component.makeUntraced("Todo")(function*(props: TodoPr completedAtField, ] = yield* Component.useOnChange(() => Effect.gen(function*() { const indexRef = Match.value(props).pipe( - Match.tag("new", () => Subscribable.make({ get: Effect.succeed(-1), changes: Stream.empty })), + Match.tag("new", () => Subscribable.make({ get: Effect.succeed(-1), changes: Stream.make(-1) })), Match.tag("edit", ({ id }) => state.getIndexSubscribable(id)), Match.exhaustive, ) @@ -78,7 +78,11 @@ export class Todo extends Component.makeUntraced("Todo")(function*(props: TodoPr ] as const }), [props._tag, props._tag === "edit" ? props.id : undefined]) - const [index, size, canSubmit] = yield* Subscribable.useSubscribables(indexRef, state.sizeSubscribable, form.canSubmitSubscribable) + const [index, size, canSubmit] = yield* Subscribable.useSubscribables( + indexRef, + state.sizeSubscribable, + form.canSubmitSubscribable, + ) const submit = yield* Form.useSubmit(form) const TextFieldFormInputFC = yield* TextFieldFormInput