Replies: 1 comment
-
|
As an addition: Using the workaround, makes the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Nice that view transitions are supported in React-router. But, I'm missing something. For some view transitions, you might want the root view transition, and for some you don't. ViewTransition types would be very helpful here (https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition#types). If React-router would support this via the viewTransition prop for the Link (navigate() etc), then we can add types and act accordingly.
Suggestion:
Link prop
viewTransition?: boolean=>viewTransition?: boolean | {types: string[]}.Then we could do this:
Now, browser will do the view transition for the root, but only when you want to.
I checked the code a bit, but doing a navigation is a massive piece of code, where viewTransition stuff is nested deep.
If I make this own Link component for now, viewTransition does work, but I wonder if there are any downsides of doing this?
Beta Was this translation helpful? Give feedback.
All reactions