Skip to content

Commit 33ebf39

Browse files
committed
Remove extra loading.tsx
1 parent 9095aaa commit 33ebf39

2 files changed

Lines changed: 19 additions & 31 deletions

File tree

app/partial-fallbacks/[slug]/loading.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

app/partial-fallbacks/readme.mdx

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,26 @@ export const demo = db.demo.find({ where: { slug: 'partial-fallbacks' } });
1414

1515
# !!col
1616

17-
```ts next.config.ts
18-
const nextConfig = {
19-
experimental: {
17+
```tsx app/partial-fallbacks/[slug]/page.tsx
18+
'use cache';
19+
20+
import { Suspense } from 'react';
21+
22+
// !mark
23+
export async function generateStaticParams() {
24+
return [{ slug: '1' }, { slug: '2' }, { slug: '3' }];
25+
}
26+
27+
export default async function Page({ params }) {
28+
const { slug } = await params;
29+
30+
return (
2031
// !mark
21-
partialFallbacks: true,
22-
},
23-
};
32+
<Suspense fallback={<ProductSkeleton />}>
33+
<ProductDetail slug={slug} />
34+
</Suspense>
35+
);
36+
}
2437
```
2538

2639
</Grid>

0 commit comments

Comments
 (0)