Skip to content

Commit

Permalink
Fix AnimatePresence won't unmount fastly changing content
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeSeoKim committed Jun 6, 2022
1 parent 9f22f77 commit 245dafb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const AnimatePresence: React.FunctionComponent<
const filteredChildren = onlyElements(children)
let childrenToRender = filteredChildren

const exiting = new Set<ComponentKey>()
const exiting = useRef(new Set<ComponentKey>()).current

// Keep a living record of the children we're actually rendering so we
// can diff to figure out which are entering and exiting
Expand Down

0 comments on commit 245dafb

Please sign in to comment.