TanStackT
TanStack4mo ago
9 replies
brilliant-lime

Enable viewTransition on router.history.back()

Hi folks,
I am using the defaultViewTransitions=false on my createTanStackRouter, as i want to be able to enable view transition for specific transitions only.

At a case, i am using it on a <Link>, but also need to use on the way back (router.history.back()).
Why router.history.back() ? Because its a gallery and i want to restore scroll position on where the user was on the page before navigate to the item page.

This brings me to this question: is it possible to enable viewTransition on router.history.back as we do for Link components?
Was this page helpful?