我开始使用Nextjs的新特性并行路由。
我的app结构如下所示:
[course]
├── @children
├── @hero
| ├── page.tsx
| ├── loading.tsx
| └── error.tsx
└── layout.tsx
我看到@children和@hero插槽,但是loading和error不起作用。
我尝试将async fetch添加到[course]/@hero/page.tsx
,而不是显示[course]/@hero/loading.tsx
的加载状态,它只是忽略它,我甚至看不到其他插槽(@children),直到它完成fetch。
也许我错过了一些非常重要的东西。救命啊!
1条答案
按热度按时间63lcw9qa1#
在并行插槽内创建路由组