0.2.4 (#38)
All checks were successful
Publish / publish (push) Successful in 59s
Lint / lint (push) Successful in 15s

Co-authored-by: Julien Valverdé <julien.valverde@mailo.com>
Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud>
Reviewed-on: #38
This commit was merged in pull request #38.
This commit is contained in:
2026-03-16 00:30:17 +01:00
parent 092737076f
commit 67b01d4621
66 changed files with 5167 additions and 431 deletions

View File

@@ -13,15 +13,16 @@ const Post = Schema.Struct({
body: Schema.String,
})
const ResultView = Component.makeUntraced("Result")(function*() {
const ResultView = Component.make("ResultView")(function*() {
const runPromise = yield* Component.useRunPromise()
const [idRef, query, mutation] = yield* Component.useOnMount(() => Effect.gen(function*() {
const idRef = yield* SubscriptionRef.make(1)
const key = Stream.map(idRef.changes, id => [id] as const)
const query = yield* Query.service({
key: Stream.zipLatest(Stream.make("posts" as const), idRef.changes),
f: ([, id]) => HttpClient.HttpClient.pipe(
key,
f: ([id]) => HttpClient.HttpClient.pipe(
Effect.tap(Effect.sleep("500 millis")),
Effect.andThen(client => client.get(`https://jsonplaceholder.typicode.com/posts/${ id }`)),
Effect.andThen(response => response.json),