@reffuse/extension-query 0.1.5 #16

Merged
Thilawyn merged 347 commits from next into master 2025-06-01 05:28:47 +02:00
Showing only changes of commit 8d52443b55 - Show all commits

View File

@@ -188,11 +188,10 @@ export const run = <K extends readonly unknown[], A, E>(
if (typeof window !== "undefined" && (options?.refreshOnWindowFocus ?? true))
yield* Stream.runForEach(BrowserStream.fromEventListenerWindow("focus"), () => self.forkRefresh)
yield* Effect.addFinalizer(() => self.interrupt).pipe(
Effect.andThen(Stream.runForEach(Stream.changes(self.queryKey), latestKey =>
Ref.set(self.latestKeyRef, Option.some(latestKey)).pipe(
Effect.andThen(self.forkFetch)
)
))
yield* Effect.addFinalizer(() => self.interrupt)
yield* Stream.runForEach(Stream.changes(self.queryKey), latestKey =>
Ref.set(self.latestKeyRef, Option.some(latestKey)).pipe(
Effect.andThen(self.forkFetch)
)
)
})