SteffeyDev / react-native-popover-view

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

Incorrect ref type #178

Closed AdamGerthel closed 3 months ago

AdamGerthel commented 3 months ago

Describe the bug I'm not able to correctly type the ref to use in the from prop. I suspect this was introduced with this change.

Basically, the ref needs to be typed as React.Component for this package to accept it as a from value, but when the ref is typed as such, React Native doesn't accept it.

Device/Setup Info:

Screenshots

Screenshot 2024-08-12 at 11 59 57

AdamGerthel commented 3 months ago

Weirdly enough, passing a point doesn't seem to be accepted by TS either?

Screenshot 2024-08-12 at 13 20 43
AdamGerthel commented 3 months ago

nvm, solved by using React.useRef<View>(null)