SteffeyDev / react-native-popover-view

A well-tested, adaptable, lightweight <Popover> component for react-native
MIT License
613 stars 92 forks source link

fix: fix #181 - use measureInWindow of the ref instead of NativeModules #182

Open arpitdalal opened 1 week ago

arpitdalal commented 1 week ago

NativeModules is not working in the new architecture, so using the measureInWindow method on the ref as suggested by the react-native documentation here and here.

mlazari commented 1 week ago

@arpitdalal Is this a breaking change for apps that still didn't enable new architecture or it works for those too?

arpitdalal commented 1 week ago

Hey, just to clarify @arpitdalal-hp and I are the same person with different profiles. Sorry for the confusion but I didn't notice I created the PR with a different profile than the issue. I pushed a commit to address your comment, initially I removed the usage of NativeModules, but to support older react-native versions, I've added it back with a check to use it if measureInWindow doesn't exist on ref.

smfunder commented 5 days ago

hey @arpitdalal I just created a bug here with a patch file, but didn't find your PR. But we are fixing the exact same issue.

Here is my bug report: https://github.com/SteffeyDev/react-native-popover-view/issues/183