@@ -195,7 +195,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
195195 return $modal
196196 ? _animatedContainerHeight . value - verticalInset
197197 : _animatedContainerHeight . value ;
198- } , [ $modal , topInset , bottomInset ] ) ;
198+ } , [ topInset , bottomInset , $modal , _animatedContainerHeight . value ] ) ;
199199 const animatedContainerOffset = useReactiveSharedValue (
200200 _providedContainerOffset ?? INITIAL_CONTAINER_OFFSET
201201 ) as Animated . SharedValue < Insets > ;
@@ -214,7 +214,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
214214 maxDynamicContentSize
215215 ) ;
216216 const animatedHighestSnapPoint = useDerivedValue (
217- ( ) => animatedSnapPoints . value [ animatedSnapPoints . value . length - 1 ]
217+ ( ) => animatedSnapPoints . value [ animatedSnapPoints . value . length - 1 ] ,
218+ [ animatedSnapPoints . value ]
218219 ) ;
219220 const animatedClosedPosition = useDerivedValue ( ( ) => {
220221 let closedPosition = animatedContainerHeight . value ;
@@ -224,9 +225,10 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
224225 }
225226
226227 return closedPosition ;
227- } , [ $modal , detached , bottomInset ] ) ;
228+ } , [ animatedContainerHeight . value , $modal , detached , bottomInset ] ) ;
228229 const animatedSheetHeight = useDerivedValue (
229- ( ) => animatedContainerHeight . value - animatedHighestSnapPoint . value
230+ ( ) => animatedContainerHeight . value - animatedHighestSnapPoint . value ,
231+ [ animatedContainerHeight . value , animatedHighestSnapPoint . value ]
230232 ) ;
231233 const animatedCurrentIndex = useReactiveSharedValue (
232234 animateOnMount ? - 1 : _providedIndex
@@ -274,7 +276,13 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
274276 isHandleHeightCalculated &&
275277 isSnapPointsNormalized
276278 ) ;
277- } ) ;
279+ } , [
280+ _providedContainerHeight ,
281+ animatedContainerHeight . value ,
282+ animatedHandleHeight ,
283+ animatedSnapPoints . value ,
284+ handleComponent ,
285+ ] ) ;
278286 const isInTemporaryPosition = useSharedValue ( false ) ;
279287 const isForcedClosing = useSharedValue ( false ) ;
280288
@@ -399,7 +407,12 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
399407 }
400408
401409 return SCROLLABLE_STATE . LOCKED ;
402- } ) ;
410+ } , [
411+ animatedAnimationState . value ,
412+ animatedKeyboardState . value ,
413+ animatedScrollableOverrideState . value ,
414+ animatedSheetState . value ,
415+ ] ) ;
403416 // dynamic
404417 const animatedContentHeightMax = useDerivedValue ( ( ) => {
405418 const keyboardHeightInContainer = animatedKeyboardHeightInContainer . value ;
@@ -513,7 +526,18 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
513526 }
514527
515528 return currentIndex ;
516- } , [ android_keyboardInputMode ] ) ;
529+ } , [
530+ android_keyboardInputMode ,
531+ animatedAnimationSource . value ,
532+ animatedAnimationState . value ,
533+ animatedContainerHeight . value ,
534+ animatedCurrentIndex . value ,
535+ animatedNextPositionIndex . value ,
536+ animatedPosition . value ,
537+ animatedSnapPoints . value ,
538+ isInTemporaryPosition . value ,
539+ isLayoutCalculated . value ,
540+ ] ) ;
517541 //#endregion
518542
519543 //#region private methods
@@ -1258,7 +1282,12 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
12581282 configs : _providedAnimationConfigs ,
12591283 } ) ,
12601284 } ;
1261- } , [ animatedContentHeightMax , enableDynamicSizing , animatedContentHeight ] ) ;
1285+ } , [
1286+ enableDynamicSizing ,
1287+ animatedContentHeight . value ,
1288+ animatedContentHeightMax . value ,
1289+ _providedAnimationConfigs ,
1290+ ] ) ;
12621291 const contentContainerStyle = useMemo (
12631292 ( ) => [ styles . contentContainer , contentContainerAnimatedStyle ] ,
12641293 [ contentContainerAnimatedStyle ]
@@ -1277,7 +1306,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
12771306 return {
12781307 paddingBottom : animatedContainerHeight . value ,
12791308 } ;
1280- } , [ detached ] ) ;
1309+ } , [ animatedContainerHeight . value , detached ] ) ;
12811310 const contentMaskContainerStyle = useMemo (
12821311 ( ) => [ styles . contentMaskContainer , contentMaskContainerAnimatedStyle ] ,
12831312 [ contentMaskContainerAnimatedStyle ]
@@ -1424,7 +1453,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
14241453 }
14251454 }
14261455 animateToPosition ( nextPosition , animationSource , 0 , animationConfig ) ;
1427- }
1456+ } ,
1457+ [ ]
14281458 ) ;
14291459
14301460 /**
@@ -1547,7 +1577,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
15471577 if ( _providedAnimatedPosition ) {
15481578 _providedAnimatedPosition . value = _animatedPosition + topInset ;
15491579 }
1550- }
1580+ } ,
1581+ [ ]
15511582 ) ;
15521583
15531584 /**
@@ -1559,7 +1590,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
15591590 if ( _providedAnimatedIndex ) {
15601591 _providedAnimatedIndex . value = _animatedIndex ;
15611592 }
1562- }
1593+ } ,
1594+ [ ]
15631595 ) ;
15641596
15651597 /**
0 commit comments