enesozturk / react-native-hold-menu

📱 A performant, easy to use hold to open context menu for React Native powered by Reanimated 🚀
https://enesozturk.github.io/react-native-hold-menu/
MIT License
1.4k stars 90 forks source link

Crash with latest version of reanimated2 #17

Closed zhigang1992 closed 3 years ago

zhigang1992 commented 3 years ago

Describe the bug Example app crashes with reanimated 2.0.1

To Reproduce Upgrade to reanimated 2.0.1 Open example app

Screenshots

image

Package versions See example app

enesozturk commented 3 years ago

Hi @zhigang1992, could your provide other details like code snippets? How did you implement it? I will try to reporduce it.

zhigang1992 commented 3 years ago

I'm running the example app, with reanimated upgraded to 2.0.1

ksitko commented 3 years ago

This is what I had been seeing myself as per our previous discussion in #11 @enesozturk Perhaps it would be worth opening a new issue in the Reanimated repo?

zhigang1992 commented 3 years ago

Yeah, it seems like it's not released

https://github.com/software-mansion/react-native-reanimated/issues/1874#issuecomment-809123683

enesozturk commented 3 years ago

Yeah, it seems like it's not released

software-mansion/react-native-reanimated#1874 (comment)

Oh this is good to know 😄 As I guessed here it is not included in v2.0.1 as I understood. Will wait the new release. But at the end, it is not good to force people to use latest version of Reanimated..

enesozturk commented 3 years ago

https://github.com/software-mansion/react-native-reanimated/releases/tag/2.1.0 It is here 🔥 Lets try guys 🤓

llr101 commented 3 years ago

@enesozturk it is ok. Thank you very much!!! looking forwards to the function of switching from longPress to one click(onPress) able! ^_^

llr101 commented 3 years ago

Your design is so beautiful! This is my favorite react native program ! Thank you very much!!!!!

zhigang1992 commented 3 years ago

The crash is indeed fixed. 👍

The example app is working as expected.

Quick question, do we need to save the whole onPress callback in shared value? Could it be on the context instead?

enesozturk commented 3 years ago

The crash is indeed fixed. 👍

The example app is working as expected.

Quick question, do we need to save the whole onPress callback in shared value? Could it be on the context instead?

That is great to know 👍🏽 Good question. It is important to move list data super fast because for example in Whatsapp, message sender and receiver has different list values. That is why shared value is needed. It is already in context actually.