0.1.3 #4

Merged
Thilawyn merged 90 commits from next into master 2025-08-23 03:07:28 +02:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 1f0f36621d - Show all commits

View File

@@ -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),

View File

@@ -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),