react-native-menu / menu

UIMenu Component for React Native
MIT License
1.01k stars 62 forks source link

[android] fix: use hitSlop setter instead of property access for RN 0.74 compatibility #746

Closed fobos531 closed 7 months ago

fobos531 commented 7 months ago

Overview

Fixes https://github.com/react-native-menu/menu/issues/736

Not sure why, but it seems like RN 0.74 (or newer Kotlin compiler) is more strict in terms of value reassignment. While in the past we were able to use direct property access on the view argument, it seems like now we have to use usual property setters.

Test Plan

The app compiles successfully.

Note: there's still work to be done for bringing bridgeless compatbility to this library's Android side (maybe iOS as well). Namely, the current way of sending events doesn't seem to work on bridgeless, see: https://github.com/reactwg/react-native-new-architecture/discussions/154#discussioncomment-9082416

Do you have any insight on what could be the culprit and how to fix this?