Skip to content

Commit 9757bd2

Browse files
pinponggorhom
andauthored
fix(#1983): updated shared values access as hook dependancies (#1992)(by @pinpong)
* fix(#1983): updated shared values access as hook dependancies * chore: removed render message --------- Co-authored-by: Mo Gorhom <gorhom.dev@gmail.com>
1 parent 13c7d47 commit 9757bd2

File tree

1 file changed

+17
-29
lines changed

1 file changed

+17
-29
lines changed

src/components/bottomSheet/BottomSheet.tsx

+17-29
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
284284
);
285285
}, [
286286
_providedContainerHeight,
287-
animatedContainerHeight.value,
287+
animatedContainerHeight,
288288
animatedHandleHeight,
289-
animatedSnapPoints.value,
289+
animatedSnapPoints,
290290
handleComponent,
291291
]);
292292
const isInTemporaryPosition = useSharedValue(false);
@@ -433,10 +433,10 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
433433
return SCROLLABLE_STATE.LOCKED;
434434
}, [
435435
enableContentPanningGesture,
436-
animatedAnimationState.value,
437-
animatedKeyboardState.value,
438-
animatedScrollableOverrideState.value,
439-
animatedSheetState.value,
436+
animatedAnimationState,
437+
animatedKeyboardState,
438+
animatedScrollableOverrideState,
439+
animatedSheetState,
440440
]);
441441
// dynamic
442442
const animatedContentHeightMax = useDerivedValue(() => {
@@ -553,15 +553,15 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
553553
return currentIndex;
554554
}, [
555555
android_keyboardInputMode,
556-
animatedAnimationSource.value,
557-
animatedAnimationState.value,
558-
animatedContainerHeight.value,
559-
animatedCurrentIndex.value,
560-
animatedNextPositionIndex.value,
561-
animatedPosition.value,
562-
animatedSnapPoints.value,
563-
isInTemporaryPosition.value,
564-
isLayoutCalculated.value,
556+
animatedAnimationSource,
557+
animatedAnimationState,
558+
animatedContainerHeight,
559+
animatedCurrentIndex,
560+
animatedNextPositionIndex,
561+
animatedPosition,
562+
animatedSnapPoints,
563+
isInTemporaryPosition,
564+
isLayoutCalculated,
565565
]);
566566
//#endregion
567567

@@ -1499,8 +1499,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
14991499
};
15001500
}, [
15011501
enableDynamicSizing,
1502-
animatedContentHeight.value,
1503-
animatedContentHeightMax.value,
1502+
animatedContentHeight,
1503+
animatedContentHeightMax,
15041504
_providedOverrideReduceMotion,
15051505
_providedAnimationConfigs,
15061506
]);
@@ -1867,18 +1867,6 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
18671867
//#endregion
18681868

18691869
// render
1870-
if (__DEV__) {
1871-
print({
1872-
component: BottomSheet.name,
1873-
method: 'render',
1874-
params: {
1875-
animatedSnapPoints: animatedSnapPoints.value,
1876-
animatedCurrentIndex: animatedCurrentIndex.value,
1877-
providedIndex: _providedIndex,
1878-
},
1879-
});
1880-
}
1881-
18821870
const DraggableView = enableContentPanningGesture
18831871
? BottomSheetDraggableView
18841872
: Animated.View;

0 commit comments

Comments
 (0)