Search code examples
reactjsanimationreact-router-dom

How To apply Animations using React Router when going from one route to another?


Suppose I have made some routes in the navigation component and when I click them the route changes and they navigate me to another component. Now if I want to apply some animations when navigating from one route to another, how can I do it when I am using react-router dom??


Solution

  • there are few packages available. You can explore React Router's Animated Transition OR another most used package framer-motion.