question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v4] | gesture-handler old API Warning and bottomsheet doesn't render

See original GitHub issue

Bug

When adding a simple bottomsheet to my recently created app I’m greeted with a “using wrong gesture handler api” warning and the bottomsheet doesn’t render.

Full warning message: [react-native-gesture-handler] Seems like you're using an old API with gesture components, check out new Gestures system!

This doesn’t make sense as I’m following the documentation for both gesture-handler and react-native-bottomsheet and i’m using the latests version of both

Environment info

Library Version
@gorhom/bottom-sheet 4
react-native 17.0.2
react-native-reanimated ^2.3.1
react-native-gesture-handler ^2.2.0

Steps To Reproduce

1.Simply add and import everything in the “usage” documentation page:

<BottomSheet
        ref={bottomSheetRef}
        index={1}
        snapPoints={snapPoints}
        onChange={handleSheetChanges}>
        <View style={{ height: 200, backgroundColor: 'red', flex: 1 }}>
          <Text>Awesome 🎉</Text>
        </View>
      </BottomSheet>`

Describe what you expected to happen:

  1. The botom sheet should appear at 50%, and no warning should appear

Reproducible sample code

The code is in this repository and branch: https://github.com/christian-hess-94/keycash_challenge/tree/bottomsheet-bug

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

3reactions
hirbodcommented, Jan 18, 2022

This is not a bug, it’s not even directly related to this library. https://github.com/software-mansion/react-native-gesture-handler/pull/1817

Bottom Sheet was developed and released, while RNGH was at version 1.X. The new major bump introduced a new api but still supports the old API. Its more like a hint or an developer notification. I am sure Mo will migrate to the new API someday but it is not urgent. You can use LogBox to get rid of this warning.

0reactions
github-actions[bot]commented, Mar 13, 2022

This issue was closed because it has been stalled for 5 days with no activity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gesture handler not working on BottomSheet - Stack Overflow
In my code managed to get the bottomsheet to show up but upon swiping up it doesn't move. code.js import { View, Text...
Read more >
Troubleshooting | React Native Bottom Sheet - GitHub Pages
This section attempts to outline issues that users frequently encounter when first getting accustomed to using React Native Bottom Sheet.
Read more >
Building a BottomSheet from scratch in React Native - YouTube
In this tutorial we'll learn how to create from scratch a BottomSheet component by using the reanimated and the react-native- gesture-handler ...
Read more >
React native modal bottom sheet examples pdf download ...
React native bottom sheet navigation. ... react js how to prevent previous radio button active react native how to prevent render in react ......
Read more >
A React Native Bottom Sheet with Fully Configurable Options
⚠️ You need to install react-native-reanimated v2 & react-native-gesture-handler and follow their installation instructions. Usage. import React, { ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found