kanzitelli / rnn-starter

🤹 React Native Starter - Powered by cli-rn, React Native Navigation, Expo Modules, RNN Screens, RN UI lib, MMKV, Mobx, Reanimated 2, Dark Mode, Splash Screen, Localization, Notifications, Permissions, and much more.
https://starters.dev
MIT License
551 stars 72 forks source link

how to set headerShown to false on screen #65

Closed djdabs closed 2 years ago

djdabs commented 2 years ago

Hello! Thank you for this starter package, great way to get going quick.

I've been struggling to find a way to set headerShown flag on the screens. Tried both in ScreenLayouts and in Screen settings, but neither worked.

Any suggestions on where I need to go to implement this option?

kanzitelli commented 2 years ago

hi @djdabs!

Yes, headerShown is not going to work because this starter is using React Native Navigation. If you'd like to hide nav header in RNN, you need to change topBar.visible option to false for desired screens.

Main: {
  component: Main,
  options: {
    topBar: {
      visible: false, // Here
      title: {
        text: 'Main'
      }
    },
  },
},

If you want to use React Navigation instead, you need to check out rn-starter. The project structure is the same, so won't take a lot of time to get started :)

djdabs commented 2 years ago

oh oops! i feel silly for missing that. Thank you for the quick reply!

kanzitelli commented 2 years ago

@djdabs no worries! Glad it's helped :)