Skip to content

Commit a18e972

Browse files
committed
<ViewTransition> does not create a viewport-only snapshot
1 parent 52527a8 commit a18e972

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/content/reference/react/ViewTransition.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2781,7 +2781,7 @@ React starts a browser View Transition when a `<ViewTransition>` activates, but
27812781

27822782
Because activating a boundary and keeping the root snapshot are separate, CSS for `::view-transition-old(root)` and `::view-transition-new(root)` may not run for every navigation. React does not currently document a supported pattern that guarantees a root-only snapshot for route transitions. Do not rely on a small keyed boundary as that guarantee; test the behavior with your router and target browsers.
27832783

2784-
2784+
Wrapping a whole page in `<ViewTransition>` does not create a viewport-only snapshot. The browser captures the element's painted overflow, including content outside the viewport. A tall or scrolling page can therefore produce a large snapshot and use substantial memory, especially on mobile devices. Avoid wrapping a page-sized element when you only intend to animate the viewport.
27852785

27862786
---
27872787

0 commit comments

Comments
 (0)