Fix
All checks were successful
Lint / lint (push) Successful in 11s

This commit is contained in:
Julien Valverdé
2026-03-03 13:47:48 +01:00
parent 3794f56a86
commit 1f47887643
2 changed files with 11 additions and 9 deletions

View File

@@ -26,10 +26,12 @@ class AsyncFetchPostView extends Component.make("AsyncFetchPostView")(function*(
Effect.andThen(Schema.decodeUnknown(Post)),
), [props.id])
return <div>
<Heading>{post.title}</Heading>
<Text>{post.body}</Text>
</div>
return (
<div>
<Heading>{post.title}</Heading>
<Text>{post.body}</Text>
</div>
)
}).pipe(
Async.async,
Memoized.memoized,
@@ -48,7 +50,9 @@ const AsyncRouteComponent = Component.make("AsyncRouteView")(function*() {
onValueChange={flow(Array.head, Option.getOrThrow, setId)}
/>
<AsyncFetchPost id={id} />
<React.Suspense fallback={<Text>Loading...</Text>}>
<AsyncFetchPost id={id} />
</React.Suspense>
</Flex>
</Container>
)