Layout suspense boundries
Unanswered
Lukas posted this in #help-forum
LukasOP
If I have a file structure like this:
Then I have an async page.tsx and suspense boundaries inside of my two layouts, will these all be triggered at the same time and suspended, or will it waterfall each request?
test/
├── layout.tsx
└── test2/
├── layout.tsx
├── page.tsx
└── loading.tsxThen I have an async page.tsx and suspense boundaries inside of my two layouts, will these all be triggered at the same time and suspended, or will it waterfall each request?
2 Replies
LukasOP
I guess I'll share a bit more about my use case so this is less or an XY problem. I have a main website sidebar (honestly looks a bit like discords), then I have a page layout that loads specific resources for that page that are user specific. Then I have the page itself, which is (mostly) "static" content that I'm going to use revalidatePath on. There are one or two things on that page that might need to be user-specific as well (in my case showing the status of upcoming assignments for each individual user), which I'll wrap a suspense around. (ideally, I would be able to fetch this in parallel as well, but I'm fine if this has to be waterfalled).