You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just upgraded my project from RN 0.62.2 to 0.63 and I noticed the snapTo function appears to not be working. The code below worked fine on 0.62.2 (and the console.log shows up in 0.63, so the useEffect() is running..)
constbottomSheetRef=useRef();// Close the bottom sheetuseEffect(()=>{if(!bottomSheetIsOpen){console.log('closing BS!');bottomSheetRef.current.snapTo(1);}},[bottomSheetIsOpen]);
Expected Behavior
The bottom sheet should snap to provided index
Your Environment
package
version
react-native-scroll-bottom-sheet
0.6.2
react-native
0.63.0
react-native-gesture-handler
1.6.1
react-native-reanimated
1.9.0
The text was updated successfully, but these errors were encountered:
I think the issue is not the snapTo itself, but rather something to do with component being re-rendered. If you called snapTo from some button directly (and not listening to state changes, which cause re-render), it would work.
Current Behavior
I just upgraded my project from RN 0.62.2 to 0.63 and I noticed the snapTo function appears to not be working. The code below worked fine on 0.62.2 (and the console.log shows up in 0.63, so the useEffect() is running..)
Expected Behavior
The bottom sheet should snap to provided index
Your Environment
The text was updated successfully, but these errors were encountered: