-
Notifications
You must be signed in to change notification settings - Fork 11
No option to hide a header in StackNavigator #77
Comments
cc @medson10 |
I have a bit more advanced plan for this particular feature than just "headerMode" config. In reality, there are many different ways to hide a header from a screen and we've seen this being a bit tricky to solve in case of React Navigation. Right now, the header uses hardcoded My plan is to allow Then, our library just needs to extend default HeaderInterpolator and overwrite e.g. |
@czystyl I know that you've been prototyping this already, I can help you by providing the ability to set |
@grabbou that seems interesting! meanwhile, could we have another constructor in |
I know it sounds a bit "advanced" and time-consuming to implement, but I already have that in progress. I will try to land this solution tomorrow and if it doesn't work, I'll implement another workaround. CC: @czystyl |
Awesome, I think we can just use |
@grabbou is this the solution "for now" if so let's close this and add the note in the docs somewhere. |
@knowbody Do you have any examples of using this anywhere? Can't find it in the docs. |
@kennetpostigo hey, sorry for the late reply. The way you can do it is to use here's an example my App.re: open Navigation;
module NullComponent = {
let component = ReasonReact.statelessComponent("IOSHeader");
let make = (~headerProps as _, _children) => {
...component,
render: _self => ReasonReact.null,
};
};
module Main = {
let component = ReasonReact.statelessComponent("App");
let make = _children => {
...component,
render: _self =>
<StackNavigator
initialState=[|Config.Home|] headerComponent=NullComponent.make>
...(
(~currentRoute, ~navigation) =>
switch (currentRoute) {
| _ => <Home navigation />
}
)
</StackNavigator>,
};
};
let app = () => <Main />; |
Currently, there is no way to hide a header in StackNavigator
The text was updated successfully, but these errors were encountered: