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

This commit is contained in:
Julien Valverdé
2025-07-21 11:35:02 +02:00
parent 30bd1a0180
commit b5f081044e
2 changed files with 20 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ const RouteComponent = Component.make(function* AsyncRendering() {
onChange={e => setInput(e.target.value)}
/>
<VMemoizedAsyncComponent />
<VMemoizedAsyncComponent fallback={<p>Loading memoized...</p>} />
<VAsyncComponent />
</Flex>
)
@@ -61,7 +61,7 @@ const AsyncComponent = Component.make(function* AsyncComponent() {
</Flex>
)
}).pipe(
Component.suspense
Component.suspenseWithOptions({ defaultFallback: <p>Loading...</p> })
)
const MemoizedAsyncComponent = Component.memo(AsyncComponent)