-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
I tried to read the codebase in order to figure out when view-transition is added to the page.
I figured that the view-transition is created as soon as the link to the new url is clicked, this takes a snapshot immediately on the page, which causes a problem if you wrap router.push in a startTransition and track the pending state to animate something else (a loading spinner for example).
What happens is that the snapshot is an image that overlaps the content and so that animation is hidden.
My question is: Is it possible to create the view-transition DOM snapshots only when the page will change the content rather than when the router.push is called? That way it’s possible to show animations while next.js is preparing the next page content.
Metadata
Metadata
Assignees
Labels
No labels