[BUG] Exit animation wont trigger if using useMemo
for component hook
#2009
Labels
bug
Something isn't working
useMemo
for component hook
#2009
1. Read the FAQs 👇
2. Describe the bug
I have a modal component with radix-ui and framer-motion like this
It animates on enter and exit when I use it like
<DialogComponenet open={open} setOpen={setOpen} />
But when I use it from a hook like this it won't trigger the exit animation
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
Example :CodeSanbox ↗
4. Steps to reproduce

Steps to reproduce the behavior:
Open Dialog
buttonOpen Dialog (hook)
button5. Expected behavior
The exit animation on
Open Dialog (hook)
button should trigger i.e. should react as the first button's dialog does.6. Video or screenshots
--
7. Environment details
The text was updated successfully, but these errors were encountered: