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 10, 2022
1 parent b12b137 commit 27c2997
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 27c2997

Please sign in to comment.