gorhom / react-native-sticky-item

An interactive sticky item inspired by Facebook Stories.
MIT License
891 stars 48 forks source link

feat: handle initial index #6

Closed gorhom closed 4 years ago

gorhom commented 4 years ago

closing #4 , #5

gorhom commented 4 years ago

hi @Hirbod , could you test this pr , it should close #4 and #5

yarn add ssh://git@github.com:gorhom/react-native-sticky-item#feature/handle-initial-index
hirbod commented 4 years ago

Hi @gorhom,

thanks, I will check that out. I see you have imported TouchableOpacity from RNGH, let me see if this works for me without that (cause I am using TouchableScale). And I've seen that you implemented getItemLayout (I also did this locally, but even better if the library takes care of that)

I'll report back, gonna test this now

hirbod commented 4 years ago

Hi @gorhom, I tried your fixes and they work indeed, but as I thought, only when I import TouchableOpacity from RNGH. Not exactly what I would love to use, since I am using https://github.com/kohver/react-native-touchable-scale, but its ok for me. Using TouchableOpacity on my Item with your fixes works great on that Hitslop.

gorhom commented 4 years ago

glad to hear that, and indeed TouchableOpacity from RNGH will always be better suitable with gesture handler interactions.

Thanks for reporting/testing it :)

hirbod commented 4 years ago

You're welcome, thanks for your work. I will fork touchable-scale and rework it to use RNGH, it should work afterwards like I need it.