Skip to content

Commit

Permalink
chore: remove unnecessary useMemos (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak committed Aug 5, 2021
1 parent 4c32da7 commit 51fa2b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/components/bottomSheetBackdrop/BottomSheetBackdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ const BottomSheetBackdropComponent = ({

//#region variables
const containerRef = useRef<Animated.View>(null);
const pointerEvents = useMemo(
() => (enableTouchThrough ? 'none' : 'auto'),
[enableTouchThrough]
);
const pointerEvents = enableTouchThrough ? 'none' : 'auto';
//#endregion

//#region callbacks
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { memo, useMemo } from 'react';
import React, { memo } from 'react';
import BottomSheetBackground from '../bottomSheetBackground';
import type { BottomSheetBackgroundContainerProps } from './types';
import { styles } from './styles';
Expand All @@ -8,10 +8,8 @@ const BottomSheetBackgroundContainerComponent = ({
animatedPosition,
backgroundComponent: _providedBackgroundComponent,
}: BottomSheetBackgroundContainerProps) => {
const BackgroundComponent = useMemo(
() => _providedBackgroundComponent || BottomSheetBackground,
[_providedBackgroundComponent]
);
const BackgroundComponent =
_providedBackgroundComponent || BottomSheetBackground;
return _providedBackgroundComponent === null ? null : (
<BackgroundComponent
pointerEvents="none"
Expand Down

0 comments on commit 51fa2b3

Please sign in to comment.