Fix
All checks were successful
Lint / lint (push) Successful in 11s

This commit is contained in:
Julien Valverdé
2025-08-20 04:09:59 +02:00
parent bee65c1ca0
commit 1f0f36621d
2 changed files with 2 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ export const useInput: {
yield* useFork(() => Effect.all([ yield* useFork(() => Effect.all([
// Sync the upstream state with the internal state // 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. // 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.whenEffect(
Effect.andThen( Effect.andThen(
Schema.encode(options.schema)(upstreamValue), Schema.encode(options.schema)(upstreamValue),

View File

@@ -50,7 +50,7 @@ export const useOptionalInput: {
yield* useFork(() => Effect.all([ yield* useFork(() => Effect.all([
// Sync the upstream state with the internal state // 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. // 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( onSome: upstreamValue => Effect.whenEffect(
Effect.andThen( Effect.andThen(
Schema.encode(options.schema)(upstreamValue), Schema.encode(options.schema)(upstreamValue),