question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update react-native-safe-area-view dependency

See original GitHub issue

Environment

react-native > 0.60.5 react-native-paper 2.16.0

Description

react-native-safe-area-view is currently listed as version “^0.12.0”. The implementation of the SafeView component in 0.12.0 uses componentWillReceiveProps, which on react-native 0.60+ displays a YellowBox warning of the following:

Warning: componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead.

Please update the following components: SafeView

Learn more about this warning here

react-native-safe-area-view has released version 0.14, which no longer uses componentWillReceiveProps and thus avoids this Warning popping up.

However, more broadly, yesterday (September 26th), react-native-safe-area-view also just updated to version 1.0.0, which might also be worth updating the usage in this package

Reproducible Demo

Any usage of a component that uses safe-area-view should trigger this warning.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
wesleyschneidercommented, Nov 21, 2019

+1

0reactions
github-actions[bot]commented, Jan 21, 2020

Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-safe-area-context
SafeAreaView is the preferred way to consume insets. This is a regular View with insets applied as extra padding or margin. It offers...
Read more >
react-native-safe-area-view - npm package
All security vulnerabilities belong to production dependencies of direct and indirect packages. License: MIT. Security Policy: No.
Read more >
Upgrading to new versions
Upgrading your Expo project to a new version of React Native requires updating the react-native , react , and expo package versions in...
Read more >
react-native-safe-area-view
Fast, reliable, and secure dependency management. ... In the Expo managed workflow: expo install react-native-safe-area-view react-native-safe-area-context ...
Read more >
SafeAreaContext
import { SafeAreaView, SafeAreaProvider, SafeAreaInsetsContext, useSafeAreaInsets, initialWindowMetrics, } from 'react-native-safe-area-context';. SafeAreaView ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found