-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[BUG] Memory leak when scrolling animated items in a virtualized list. #3241
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
2. Describe the bug
While scrolling the virtualized list, I noticed the occurrence of memory leaks when using motion.div animation. I noticed that if I remove the animation definition from motion.div (initial={{ opacity: 0 }}, animate={{ opacity: 1 }}) the memory leak stops.
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://codesandbox.io/p/sandbox/nj8cqp?file=%2Fsrc%2FApp.js
https://nj8cqp.csb.app/
4. Steps to reproduce
Steps to reproduce the behavior:
- Go to https://nj8cqp.csb.app/
- Open chrome devtools -> performance monitor
- Scroll through the list of items on the top-down page a few times.
- The list of DOM Nodes in performance monitor grows and does not fall even after time and manual GC.
5. Expected behavior
Information telling what I should change in the client code to make the memory leak stop or fixing the bug causing it in the library.
6. Video or screenshots
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
