person s hand touching wall

React Native BottomSheetBackdrop not showing

I am using the BottomSheet and BottomSheetModal (@gorhom/bottom-sheet) in a react native app – it brings the fluid experience a user would expect from a native app.

Recently I had an issue with the Backdrop, where it wouldn’t show (I was using it with a BottomSheetModal).

It turns out, that to make it render you need to set the disappearsOnIndex Prop to -1.

const renderBackdrop = 
    (props: BottomSheetBackdropProps) => (
        <BottomSheetBackdrop 
            {...props}
            disappearsOnIndex={-1} />
    )
		

Oh, well… : )


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.