Skip to content
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

Framer Motion example skips exit animations #2635

Open
carloitaben opened this issue Oct 24, 2024 · 0 comments
Open

Framer Motion example skips exit animations #2635

carloitaben opened this issue Oct 24, 2024 · 0 comments

Comments

@carloitaben
Copy link

Which project does this relate to?

Router

Describe the bug

Hello! Loving the library so far! 😄

I was trying some of the examples and it seems that Framer Motion exit animations are not playing on the with-framer-motion example. Next.js has this problem as well. One of the workarounds found by the community is this one. I was wondering if the issue in Router could be solved by doing something similar 🤔

Maybe transitioning between pages with AnimatePresence is not worth the hassle? In Next.js there's also this library which intercepts navigations by using a custom Link component and useRouter hook. It plays an animation before commiting the navigation. This method doesn't work when using the browser's back and forwards buttons tho, but maybe that's more of a Next.js limitation

Your Example Website or App

https://stackblitz.com/github/tanstack/router/tree/main/examples/react/with-framer-motion?embed=1&theme=dark&preset=node&file=src/main.tsx

Steps to Reproduce the Bug or Issue

  1. From the index route, click on the about link
  2. Observe how the index component instantly unmounts, without playing the exit animation

Expected behavior

It should unmount after playing the exit animation

Screenshots or Videos

Screen.Recording.2024-10-24.at.18.03.40.yafw.balanced.mp4

Platform

N/A

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant