skip to Main Content

In React Native, I’m using the following dependencies:

"react-native": "^0.74.0",
"@react-navigation/bottom-tabs": "^6.6.1",
"@react-navigation/drawer": "^6.7.2",
"@react-navigation/native": "^6.0.8",
"@react-navigation/stack": "^6.3.21"
"@rneui/base": "^4.0.0-rc.8",
"@rneui/themed": "^4.0.0-rc.8",
"react-native-safe-area-context": "^4.10.5",
"react-native-screens": "^3.34.0",

In both stack and tab navigation, when I set a header, it’s creating a white space (like a paddingTop) at the top of the header bar. What could be wrong? Has anyone had a similar issue?

android-vs-ios

2

Answers


  1. To render view in React Native for iOS, we use the SafeAreaView component.

    SafeAreaView renders nested content and automatically applies padding to reflect the portion of the view that is not covered by navigation bars, tab bars, toolbars, and other ancestor views.

    Login or Signup to reply.
  2. same issue here
    i dont know from where the padding is comming , some screens have the issues somes works perfectly

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search