#Wrapping the whole app with suspense
15 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
Yesn't. Right now, no. But, when PPR and PFPR are introduced, it might(?). Best practice is to create a separate loading.js file and let nextjs add the suspense in there for you.
To do so, make a file called loading.js (or whatever file extension), then put whatever you wanted to put as a fallback in that file. From there, it just just work.
This question has been marked as answered! If you have any other questions, feel free to create another post
[Click here](#1278470479216381972 message)
thank you!
If the whole app were wrapped would the entire app show the suspense fallback until every async operation it wraps is finished?
ideally you would have more suspense inside of it
Or does it only show the fallback until the async operations that create the React element immediately inside the Suspense element finish and the element renders?
it would suspend until all of the api calls that aren't wrapped in another suspense are completed
but the alternative is a blank white screen
so this is better
very much depends on your personal use case though
Ah okay so it's not all descendants of the top level <Suspense>. It's all descendants until we find another <Suspense> boundary.