Tell us which versions you are using:
The scene prop leftButton to render the component in the nav bar. Had to roll back to v3.34.0.
Does not render the leftButton component. The rightButton prop still renders its component, but the leftButton fails. I also tried the renderLeftButton prop and that doesn't work.
leftButton={<ComponentToRender />}@tuneZola in a way, thank you! I was coming from v3.29 and never considered going back one version. I had the same behaviour, it has something to do with passing certain props, in the NavBar component there probably is a collision between renderLeft || renderRight. I have a clue where to look now, double thanks!
I think this commit might have something to do with it:
https://github.com/aksonov/react-native-router-flux/commit/1e05a97a1dff58881648bf66593b4e5df6bc228d
The order of the check was altered:
{renderBackButton(selected) || renderLeftButton(selected)}
I'm having the same problem, traced it to that line as well and couldn't get around it.
Having to use renderBackButton as a workaround.
This also seems to be causing an issue with the drawer icon. I was using renderBackButton to provide a custom back button with react-native-vector-icons:
renderBackButton(nav) { nav.navigationState.index ? <BackButton /> : null; }
In previous versions of RNRF this would only show the back button when appropriate, and it would otherwise show the drawer. Currently it doesn't show the drawer icon.
Facing the same issue myself.
I have submitted a PR to sort out this issue. Have a look. #1366
This appears to still be an issue, I am not seeing the button with the latest version 3.37.0, and with the RN 0.40.0 I cannot stay on 0.34.0, laster working version. Any status change on the fix? @kgritesh
@tuneZola I don't understand, why are you insisting on renderLeftButton? If your scene is pushed, then its better using renderBackButton, otherwise, I assume your scene is tabbar scene, just use renderLeftButton to change drawer icon.
However, if you're trying to navigate a scene that won't have a back action (at least in the navbar) and you want to render a custom left button, you may use key="reset" or other options and combine with renderLeftButton to get what you want.
@edencakir Sorry for the late response, to answer your question, I don't use renderBackButton because it forces you to use the back arrow image that I do not want. You cannot customize it to meet our design needs. And the action is for a modal view which is more of a dismissal than a back action. Also, we configured it to work with the renderLeftButton and it worked until v3.37.0 and for it to not work now is a regression. If they don't want to support that functionality now, that is fine, but take it out of the api docs and inform people of the regression or removal of support in the release notes. I don't think its good to just regress and tell people to do hacky work arounds.
Most helpful comment
I think this commit might have something to do with it:
https://github.com/aksonov/react-native-router-flux/commit/1e05a97a1dff58881648bf66593b4e5df6bc228d
The order of the check was altered:
{renderBackButton(selected) || renderLeftButton(selected)}