Next.js Discord

Discord Forum

How to stop ViewTransition triggering from deeply nested children's suspense?

Unanswered
Odorous house ant posted this in #help-forum
Open in Discord
Odorous house antOP
My page structure look like this: layout -> ViewTransition -> page -> ...children -> dialog -> ...moreChildren -> Suspense -> MyComp, MyComp is suspending while it loads data from an API and it's parent Suspense correctly shows a skeleton during this time, however after data is loaded and MyComp exists it's suspended state the ViewTransition gets triggered which causes the dialog's backdrop to flash.
How to avoid this? I already tried wrapping the Suspense in another ViewTransition but it still propagated up and caused a noticeable flash.

0 Replies