SteffeyDev / react-native-popover-view

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

Event listener errors and warnings with `react-native` version 0.65.0 and later #117

Closed matthesjh closed 3 years ago

matthesjh commented 3 years ago

Describe the bug

Starting with react-native version 0.65.0 the method Dimensions.removeEventListener is deprecated and produces a warning when closing the popover. The Dimensions.addEventListener method now returns an EventSubscription, which can be used to remove the event listener (see https://github.com/facebook/react-native/commit/c47a03563db72d1580bf87b7729bd22ce6ca63dd). Furthermore Keyboard.removeListener produces an error when closing the popover, because this method has been removed (see https://github.com/facebook/react-native/commit/1049835b504cece42ee43ac5b554687891da1349).

Device/Setup Info:

lucasfloriani commented 3 years ago

118 is a PR to fix this issue

SteffeyDev commented 3 years ago

Merged and released

SteffeyDev commented 3 years ago

Actually, #118 only fixed the keyboard part, not the dimensions

SteffeyDev commented 3 years ago

Looks like @types/react-native is not updated to 0.65.1 yet, so I can't change to using the subscription event yet because TypeScript won't build. Once @types/react-native is updated, I can complete this pretty easily.

KristofaJosh commented 3 years ago

i'll be watching this.

baatten commented 3 years ago

I also have this warning all the time. waiting as well...

matthesjh commented 3 years ago

@SteffeyDev @types/react-native is now available in version 0.65.1.

baatten commented 3 years ago

@SteffeyDev any news on this? can you help with it please?

Morten

SteffeyDev commented 3 years ago

Released v4.1.0