-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Support for the View Transition API #443
Comments
Hi, that is a really nice suggestion. Looks like RR calls // top-level component
const router = useRouter()
router.on("navigate", (options) => {
// `options` here is what passed as navigations options to Link or when `setLocation` is called
if (options.viewTransition) {
startViewTransition(...)
}
})
<Link href="/" viewTransition /> The idea is the provide a global hook that you can subscribe to when the navigation happens. This approach is similar to https://github.com/Charca/view-transitions-live/blob/0c5125f198b1e08963fe2b2ca5a10d06b2534df3/src/scripts/navigation.js#L11 Also, having this hook will potentially allow us to solve #300 (though, additional research is needed) |
Does anyone know a workaround for this which can be implemented now? |
@molefrog would you be willing to accept a PR that implements this hook API? |
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: