DEV Community

Discussion on: react-native-bottomsheet-reanimated

parazitenew profile image
parazitenew • Edited on

Hi, the ref method is not working.

this.sheetRef = React.createRef(); (inside props constructor)
ref={this.sheetRef} as prop of the BottomSheet component.

Then onPress button I call a function that do this:

returning error: undefined is not an object (evaluating 'snapPoint.tension')

Thread Thread
saffellikhan profile image
Saif Ali Khan

this.sheetRef.current.snapTo('50%'); //here you was wrong. please use array index number instead of '50%'.