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 91 forks source link

fix: fix for unreactive react keys #107

Open NoodleOfDeath opened 1 year ago

NoodleOfDeath commented 1 year ago

Summary

This addresses

MenuItems uses an numeric index for reactive keys, so react has no idea that the item needs to be recomputed when the arrow function differs between two items but all other properties are the same. This should be exposed to the developers and required to prevent the side effect of the first onPress arrow function persisting for all items that only differ by their onPress property.

ansh commented 1 year ago

This should be merged ASAP. @enesozturk

kesha-antonov commented 10 months ago

Need this also 🙏🙏🙏 @enesozturk