Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit bcc2e09

Browse files
authored
Don't return a value in useEffect callback (#367)
1 parent 15cede8 commit bcc2e09

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Popper.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ export function Popper({
6262
const [popperElement, setPopperElement] = React.useState(null);
6363
const [arrowElement, setArrowElement] = React.useState(null);
6464

65-
React.useEffect(() => setRef(innerRef, popperElement), [
66-
innerRef,
67-
popperElement,
68-
]);
65+
React.useEffect(() => {
66+
setRef(innerRef, popperElement)
67+
}, [innerRef, popperElement]);
6968

7069
const options = React.useMemo(
7170
() => ({

0 commit comments

Comments
 (0)