diff --git a/src/Manager.js b/src/Manager.js index 2c5d781..f3f03f6 100644 --- a/src/Manager.js +++ b/src/Manager.js @@ -15,6 +15,7 @@ export function Manager({ children }: ManagerProps): React.Node { const hasUnmounted = React.useRef(false); React.useEffect(() => { + hasUnmounted.current = false; return () => { hasUnmounted.current = true; }; diff --git a/src/Reference.js b/src/Reference.js index 81cd115..9eb9cc6 100644 --- a/src/Reference.js +++ b/src/Reference.js @@ -22,10 +22,6 @@ export function Reference({ children, innerRef }: ReferenceProps): React.Node { [innerRef, setReferenceNode] ); - // ran on unmount - // eslint-disable-next-line react-hooks/exhaustive-deps - React.useEffect(() => () => setRef(innerRef, null), []); - React.useEffect(() => { warning( Boolean(setReferenceNode),