Is your feature request related to a problem? Please Describe.
Rendering a StatusBar component as a part of the Header component causes a lot of side-effects. Such as not being able to implement custom StatusBar components, like the one described in this react-navigation guide.
Describe the solution you'd like
I think it would make sense to optionally render the StatusBar based on a prop. Such as:
<Header
statusBar={false}
/>
which would then make the Header component look something like
<>
{props.statusBar === true && (
<StatusBar
barStyle={barStyle}
translucent={true}
backgroundColor={backgroundColor || theme?.colors?.primary}
{...statusBarProps}
/>
)}
</>
Describe alternatives you've considered
Since the last StatusBar in the render tree always takes preference, it is quite impossible to do custom logic on the StatusBar somewhere higher in the render tree, so I don't see another option, but please let me know if there's something I'm missing.
Additional context
If there are any issues with the approach that I've missed, please let me know, otherwise I'm happy to open a pull request with the above implementation 😄
Is your feature request related to a problem? Please Describe.
Rendering a
StatusBarcomponent as a part of theHeadercomponent causes a lot of side-effects. Such as not being able to implement customStatusBarcomponents, like the one described in this react-navigation guide.Describe the solution you'd like
I think it would make sense to optionally render the
StatusBarbased on a prop. Such as:which would then make the
Headercomponent look something likeDescribe alternatives you've considered
Since the last
StatusBarin the render tree always takes preference, it is quite impossible to do custom logic on theStatusBarsomewhere higher in the render tree, so I don't see another option, but please let me know if there's something I'm missing.Additional context
If there are any issues with the approach that I've missed, please let me know, otherwise I'm happy to open a pull request with the above implementation 😄