diff --git a/packages/effect-fc/src/hooks/Hooks/input/useInput.ts b/packages/effect-fc/src/hooks/Hooks/input/useInput.ts index cb2f1dc..215eac6 100644 --- a/packages/effect-fc/src/hooks/Hooks/input/useInput.ts +++ b/packages/effect-fc/src/hooks/Hooks/input/useInput.ts @@ -32,7 +32,7 @@ export const useInput: { yield* useFork(() => Effect.all([ // Sync the upstream state with the internal state // Only mutate the internal state if the upstream value is actually different. This avoids infinite re-render loops. - Stream.runForEach(Stream.drop(Stream.changesWith(options.ref.changes, Equivalence.strict()), 1), upstreamValue => + Stream.runForEach(Stream.changesWith(options.ref.changes, Equivalence.strict()), upstreamValue => Effect.whenEffect( Effect.andThen( Schema.encode(options.schema)(upstreamValue), diff --git a/packages/effect-fc/src/hooks/Hooks/input/useOptionalInput.ts b/packages/effect-fc/src/hooks/Hooks/input/useOptionalInput.ts index 4f9a246..3a77d6c 100644 --- a/packages/effect-fc/src/hooks/Hooks/input/useOptionalInput.ts +++ b/packages/effect-fc/src/hooks/Hooks/input/useOptionalInput.ts @@ -50,7 +50,7 @@ export const useOptionalInput: { yield* useFork(() => Effect.all([ // Sync the upstream state with the internal state // Only mutate the internal state if the upstream value is actually different. This avoids infinite re-render loops. - Stream.runForEach(Stream.drop(Stream.changesWith(options.ref.changes, Equivalence.strict()), 1), Option.match({ + Stream.runForEach(Stream.changesWith(options.ref.changes, Equivalence.strict()), Option.match({ onSome: upstreamValue => Effect.whenEffect( Effect.andThen( Schema.encode(options.schema)(upstreamValue),