We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a2859f commit 520c2e8Copy full SHA for 520c2e8
src/hooks/useOrientation/index.ts
@@ -14,8 +14,8 @@ const useOrientation = ({onOrientationChange}: UseOrientationProps = {}) => {
14
}, []);
15
16
useEffect(() => {
17
- Constants.addDimensionsEventListener(orientationChangeListener);
18
- return () => Constants.removeDimensionsEventListener(orientationChangeListener);
+ const listener = Constants.addDimensionsEventListener(orientationChangeListener);
+ return () => Constants.removeDimensionsEventListener(listener);
19
20
21
useDidUpdate(() => {
0 commit comments