#Framer Motion ^8.0.2 - Route animation
1 messages · Page 1 of 1 (latest)
`export default function App() {
const { pathname } = useLocation()
const outlet = useOutlet()
return (
<html lang='fr'>
<head>
<Meta />
<Links />
</head>
<body>
<Navbar />
<motion.main
className='py-10'
key={pathname}
initial={{ opacity: 0, y: 15 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 15 }}
transition={{ delay: 0.25 }}>
{outlet}
</motion.main>
<ScrollRestoration />
<Scripts />
<LiveReload />
</body>
</html>
)
}`