python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Apply a class in a Framer Motion tag, animate or initial prop
How do I use a Framer Motion tag, and in the animate and initial props, Apply a class.
Like so.
<motion.div
initial={{ className: 'hidden' }}
animate={{ className: 'visible' }}
>
<div&g...
Oded Ahmed
Votes: 0
Answers: 1
Cannot animate nested routes (outlet) only in React Router Dom v6
I have a project with a few pages that are rendered within a layout with a sidebar and a topbar:
<AnimatePresence exitBeforeEnter>
<Routes location={location} key={location.pathname}>
...
Asghwor
Votes: 0
Answers: 0
AnimatePresence causing 'Uncaught TypeError: Cannot read properties of null (reading 'useRef')'
When trying to implement framer-motion into my project I get the following errors in my console and nothing renders on the page.
Warning: Invalid hook call. Hooks can only be called inside of the body...

Harrison Howard
Votes: 0
Answers: 1
Can't get AnimatePresence in Framer Motion to work
I've been trying to get <AnimatePresence> from Framer Motion to work. But for some reason, I can't get it to work. I want to have an exit animation for a mobile navbar.
Here's a screenshot of th...
Ragnsan
Votes: 0
Answers: 1