@@ -34,6 +34,7 @@ class AsyncFetchPostView extends Component.make("AsyncFetchPostView")(function*(
|
|||||||
)
|
)
|
||||||
}).pipe(
|
}).pipe(
|
||||||
Async.async,
|
Async.async,
|
||||||
|
Async.withOptions({ defaultFallback: <Text>Loading post...</Text> }),
|
||||||
Memoized.memoized,
|
Memoized.memoized,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
@@ -50,9 +51,7 @@ const AsyncRouteComponent = Component.make("AsyncRouteView")(function*() {
|
|||||||
onValueChange={flow(Array.head, Option.getOrThrow, setId)}
|
onValueChange={flow(Array.head, Option.getOrThrow, setId)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<React.Suspense fallback={<Text>Loading...</Text>}>
|
<AsyncFetchPost id={id} />
|
||||||
<AsyncFetchPost id={id} />
|
|
||||||
</React.Suspense>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
</Container>
|
</Container>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user