Suspense not getting triggered although I am accessing the result of createAsync in my components

<Suspense
fallback={
<div class="flex-1 items-center justify-center">
<DottedLoader color="#999" from="checkout suspense" />
</div>
}
>
<Suspense
fallback={
<div class="flex-1 items-center justify-center">
<DottedLoader color="#999" from="checkout suspense" />
</div>
}
>
const routeData: Accessor<ProcurementCheckoutRouteData | undefined> =
createAsync<ProcurementCheckoutRouteData>(() => {
const routeData: Accessor<ProcurementCheckoutRouteData | undefined> =
createAsync<ProcurementCheckoutRouteData>(() => {
<div class="px-3 text-h4 text-textDark">
Proceed to pay {routeData()?.xxx}
</div>
<div class="px-3 text-h4 text-textDark">
Proceed to pay {routeData()?.xxx}
</div>
This component is within a context provider which has its own suspension block. That is getting triggered fine.
1 Reply
Madaxen86
Madaxen867d ago
Can you share the complete component or make a reproduction on stackblitz (link is on https://start.solidjs.com
SolidStart
SolidStart: Fine-Grained Reactivity goes fullstack
SolidStart is a JavaScript Framework designed to build SolidJS apps and deploy them to a variety of providers.

Did you find this page helpful?