Query work
All checks were successful
Lint / lint (push) Successful in 41s

This commit is contained in:
Julien Valverdé
2025-11-21 06:02:43 +01:00
parent 70d5ef950b
commit 3b5a9abefa
2 changed files with 39 additions and 12 deletions

View File

@@ -21,7 +21,7 @@ const ResultView = Component.makeUntraced("Result")(function*() {
const query = yield* Query.service({
key,
f: ([, id]) => HttpClient.HttpClient.pipe(
Effect.tap(Effect.sleep("250 millis")),
Effect.tap(Effect.sleep("500 millis")),
Effect.andThen(client => client.get(`https://jsonplaceholder.typicode.com/posts/${ id }`)),
Effect.andThen(response => response.json),
Effect.andThen(Schema.decodeUnknown(Post)),