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 Aug 17, 2022
1 parent 3fc155b commit 29c4a5b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,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 29c4a5b

Please sign in to comment.