Closed hughman77 closed 3 years ago
I agree, I've been needing to do this for a while. It's on my radar. Unfortunately it is not as simple as it sounds, I remember attempting the migration before and running into unexpected difficulties. However, I'm sure things have changed since then, so it is worth another go.
Right, so biggest issue is that react-native-safe-area-context requires native modules, and this is a JS only library that does not have any native dependencies.
I'll probably just ditch the dependency, and add a displayAreaInsets
prop that can take the insets from useSafeAreaInsets
, so that users can opt-in to having the popover respect the safe insets.
Actually, it looks like react-native-safe-area-context
already has a useSafeAreaFrame
, which can probably be passed directly into the displayArea
prop. That's perfect.
This will require a new major version, as it is technically a breaking change, but should be well worth it, making this library have 0 dependencies and less calculation work.
Completed with v4.0.0
The
react-native-safe-area-view
is deprecated (https://github.com/react-navigation/react-native-safe-area-view) and the usage produces deprecation warnings in Expo projects:The global "__expo" and "Expo" objects will be removed in SDK 41. Learn more about how to fix this warning: https://expo.fyi/deprecated-globals
.