Route Modal is not animating on route exit #4092
Replies: 3 comments 8 replies
-
I was able to get it to animate using I wish we could our entire
You lose some code colocation when you have to do it this way unfortunately hacky--use-outlet-hook-for-modal-exit.mp4 |
Beta Was this translation helpful? Give feedback.
-
I found another way to get the modal to animate out without using In my
Another member in the Remix discord said this though:
Though i do like that with this solution in the video below, the whole component is encapsulated in one file 001-drawer-dismiss-wait-for-drawer-close-animation.mp4References |
Beta Was this translation helpful? Give feedback.
-
It's a bit frustrating that you have to |
Beta Was this translation helpful? Give feedback.
-
I was able to create a route modal, which is super awesome for directly linking to a modal 🔥
The modal is able to animate in when the route is activated just fine.
However, when the route is no longer active (closing the modal) the animation does not work.
001-modal-no-exit-transition.mp4
Has anyone found a workaround for this recently?
Sergio did mention using useOutlet hook for this (still need to explore), I wish I didn't have to resort to going outside of just using as normal though
https://codesandbox.io/s/antd-remix--modal-no-exit-transition-forked-bd6ckh?file=/app/routes/employees.tsx
References
Beta Was this translation helpful? Give feedback.
All reactions