Error: "Error While Updating property "edges" of a view managed by RNCSafeAreaView"
At first page somehow loads without error, But When I reload it i get this error.
import React from 'react'
import { SafeAreaView } from 'react-native-safe-area-context';
import SearchBar from './SearchBar';
const Homepage = ()=>{
return (
<SafeAreaView edges={['top']}>
<SearchBar/>
</SafeAreaView>
)
}
export default Homepage;
i tried clearing cache, updating ‘react-native-safe-area-context’ to latest version, nothing Worked
2
Answers
Problem was solved the By Downgrading the 'react-native-safe-area-context'library to version 4.0.0
cmd:
npm install [email protected]
The error you are getting is because you are trying to set the edges property of a SafeAreaView to a string. The edges property expects an array of strings, so you need to change your code to the following:
Here is a link to the GitHub issue that discusses this problem: https://github.com/th3rdwave/react-native-safe-area-context/issues/190