Skip to content

Commit 51fa2b3

Browse files
authored
chore: remove unnecessary useMemos (#515)
1 parent 4c32da7 commit 51fa2b3

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

src/components/bottomSheetBackdrop/BottomSheetBackdrop.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ const BottomSheetBackdropComponent = ({
3737

3838
//#region variables
3939
const containerRef = useRef<Animated.View>(null);
40-
const pointerEvents = useMemo(
41-
() => (enableTouchThrough ? 'none' : 'auto'),
42-
[enableTouchThrough]
43-
);
40+
const pointerEvents = enableTouchThrough ? 'none' : 'auto';
4441
//#endregion
4542

4643
//#region callbacks

src/components/bottomSheetBackgroundContainer/BottomSheetBackgroundContainer.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { memo, useMemo } from 'react';
1+
import React, { memo } from 'react';
22
import BottomSheetBackground from '../bottomSheetBackground';
33
import type { BottomSheetBackgroundContainerProps } from './types';
44
import { styles } from './styles';
@@ -8,10 +8,8 @@ const BottomSheetBackgroundContainerComponent = ({
88
animatedPosition,
99
backgroundComponent: _providedBackgroundComponent,
1010
}: BottomSheetBackgroundContainerProps) => {
11-
const BackgroundComponent = useMemo(
12-
() => _providedBackgroundComponent || BottomSheetBackground,
13-
[_providedBackgroundComponent]
14-
);
11+
const BackgroundComponent =
12+
_providedBackgroundComponent || BottomSheetBackground;
1513
return _providedBackgroundComponent === null ? null : (
1614
<BackgroundComponent
1715
pointerEvents="none"

0 commit comments

Comments
 (0)