fix: use react-native-safe-area-context instead of deprecated SafeAreaView#395
Open
yocontra wants to merge 1 commit intonandorojo:masterfrom
Open
fix: use react-native-safe-area-context instead of deprecated SafeAreaView#395yocontra wants to merge 1 commit intonandorojo:masterfrom
yocontra wants to merge 1 commit intonandorojo:masterfrom
Conversation
…aView SafeAreaView from react-native has been deprecated and will be removed in a future release. This change updates the import to use the recommended react-native-safe-area-context package instead. This also fixes a development warning that appears because React Fast Refresh enumerates all exports from moti, triggering the deprecation getter even when SafeAreaView is not directly used. Added react-native-safe-area-context as a peer dependency.
|
@yocontra is attempting to deploy a commit to the Fernando Rojo's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SafeAreaViewimport fromreact-nativewithreact-native-safe-area-contextreact-native-safe-area-contextas a peer dependencyProblem
SafeAreaViewfromreact-nativehas been deprecated and will be removed in a future release. The React Native team recommends usingreact-native-safe-area-contextinstead.Additionally, this causes a development warning to appear even when
SafeAreaViewis not directly used. When importing anything frommoti, React Fast Refresh enumerates all exports which triggers the deprecation getter forSafeAreaView.Solution
Import
SafeAreaViewfromreact-native-safe-area-contextinstead ofreact-native. Added as a peer dependency since most React Native projects already have it installed (it's required by React Navigation and other common libraries).