<Suspense>
<Routes>
{
// a component somewhere
() => {
const resource = createResource(...);
return (
<Table data={resource()/* resource is read at this level to support table sorting/filtering, etc */}>
<TableHeader />
<Show when={!resource.loading} fallback={<LoadingRow />}>
<TableRows />
</Show>
</Table>
);
}
}
</Routes>
</Suspense>
<Suspense>
<Routes>
{
// a component somewhere
() => {
const resource = createResource(...);
return (
<Table data={resource()/* resource is read at this level to support table sorting/filtering, etc */}>
<TableHeader />
<Show when={!resource.loading} fallback={<LoadingRow />}>
<TableRows />
</Show>
</Table>
);
}
}
</Routes>
</Suspense>