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
The View Transitions API is currently experimental but has received some adoptions already. As soon as I discovered wouter I immediately fall in love with its simplicity design. No offenses, but complications around react-router-dom has drove me crazy and I just don't need all the loader abilities in my simple SPA. (sorry for going too far on this...)
However it seems that wouter hasn't support the View Transitions API yet. react-router-dom supported this under a unstable_viewTransition prop on <Link /> which I think is a pretty nice trade-off. Will wouter consider adding this prop to the <Link /> component?
The text was updated successfully, but these errors were encountered:
GalvinGao
changed the title
Support for the View Transition API
[Feature Request] Support for the View Transition API
Apr 28, 2024
Hi, that is a really nice suggestion. Looks like RR calls startViewTransition under the hood, and I doubt we can fully recreate this API for the sake of size. However, I think we can provide a way for users to control how they want transition to be executed. Here is how I see the API:
// top-level componentconstrouter=useRouter()router.on("navigate",(options)=>{// `options` here is what passed as navigations options to Link or when `setLocation` is calledif(options.viewTransition){startViewTransition(...)}})<Linkhref="/"viewTransition/>
The View Transitions API is currently experimental but has received some adoptions already. As soon as I discovered
wouter
I immediately fall in love with its simplicity design. No offenses, but complications aroundreact-router-dom
has drove me crazy and I just don't need all theloader
abilities in my simple SPA. (sorry for going too far on this...)However it seems that
wouter
hasn't support the View Transitions API yet.react-router-dom
supported this under aunstable_viewTransition
prop on<Link />
which I think is a pretty nice trade-off. Willwouter
consider adding this prop to the<Link />
component?The text was updated successfully, but these errors were encountered: