@@ -28,8 +28,10 @@ export const useAll = Effect.fnUntraced(function* <const T extends readonly View
|
||||
yield* Component.useOnMount(() => Effect.all(elements.map(View.get)))
|
||||
)
|
||||
|
||||
yield* Component.useReactEffect(() => View.changes(View.zipLatestAll(...elements)).pipe(
|
||||
yield* Component.useReactEffect(() => Stream.make(reactStateValue).pipe(
|
||||
Stream.concat(View.changes(View.zipLatestAll(...elements))),
|
||||
Stream.changesWith((options?.equivalence as Equivalence.Equivalence<any[]> | undefined) ?? Equivalence.Array(Equivalence.strictEqual())),
|
||||
Stream.drop(1),
|
||||
Stream.runForEach(v =>
|
||||
Effect.sync(() => setReactStateValue(v))
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user