You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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