feat: ViewTransitionWrapper shared component with stable react-dom fallback

Wraps children in React's ViewTransition (canary API) when available,
falling back to Fragment in environments where ViewTransition is undefined
(test env, stable react-dom). Add react/canary to tsconfig types to
expose the ViewTransition component type.
This commit is contained in:
Ilia Mashkov
2026-05-12 16:10:37 +03:00
parent 0090718869
commit 7cba3053f4
5 changed files with 62 additions and 1 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
"name": "next"
}
],
"types": ["vitest/globals"],
"types": ["vitest/globals", "react/canary"],
"paths": {
"@/*": ["./*"],
"$shared/*": ["./src/shared/*"],