gorhom / react-native-bottom-sheet

A performant interactive bottom sheet with fully configurable options 🚀
https://ui.gorhom.dev/components/bottom-sheet
MIT License
6.66k stars 740 forks source link

Incompatible with reanimated v2 #7

Closed sa8ab closed 4 years ago

sa8ab commented 4 years ago

Current Behavior

App crashes with the example usage from docs

Expected Behavior

Not to crash

How to reproduce

Run a simple example of the library using Reanimated 2

The reason I guess since I had faced it before is that it uses interpolate instead of interpolateNode since in reanimated 2 it should me imported as interpolateNode one place I found that is using interpolate

gorhom commented 4 years ago

hi @sa8ab , thanks for reporting this

this is expected crash, the library was built with Reanimated v1, However migrating this library to Reanimated v2 is a plan for sure.

let me know if you want to contribute :)

sa8ab commented 4 years ago

Reanimated2 was supposed to be backward compatible with v1, if this is not the case I we almost can't have v2 installed beside the libraries that use v1!! I'm happyn't :((

sa8ab commented 4 years ago

@gorhom I converted imports from interpolate to interpolateNode and easing to EasingNode and it doesn't crash anymore, but I get the following error. can you help me with it? image

gorhom commented 4 years ago

Hi @sa8ab! Try pulling latest commits from master again ! It should work

sa8ab commented 4 years ago

I made it work with Reanimated v2 and it looks quite emazing, I will pull a request for v2.

Only issue I am facing it that, when you scroll out of bottomsheet, I mean "while scrolling to bottom and finger goes out of the bottom sheet" , all the gestures disable which does not feel quite perfect in this case. You have any idea how to make it work? @gorhom

gorhom commented 4 years ago

Great! Not sure why, but ill need to examine the gestures states

sa8ab commented 4 years ago

Nice, let me know if you need screen recording of what is happening

gorhom commented 4 years ago

You could submit a draft pr, and ill investigate it with you