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 dcac3b9 commit ee504daCopy full SHA for ee504da
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