react-router-navigation
react-router-navigation copied to clipboard
BottomNavigation with Outside Navigation
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
There seems to be a weird bug when combining BottomNavigation with another Navigation outside of it:
<Switch>
<Route path="/action-funnel" component={AddActionNavigation} />
<Route
path="/"
render={() => (
<BottomNavigation
lazy={true}
tabTintColor={colors.LIGHTGRAY}
tabActiveTintColor={colors.WHITE}
tabBarStyle={{backgroundColor: colors.SEAGREEN, height: 60}}
>
<Tab
label="Accounts"
path="/accounts"
component={AccountNavigation}
renderTabIcon={({ focused, tabTintColor, tabActiveTintColor }) => (
<Icon
name="logo-usd"
size={24}
style={{
color: focused ? tabActiveTintColor : tabTintColor,
}}
/>
)}
/>
<Tab
label="Actions"
path="/actions"
component={ActionNavigation}
renderTabIcon={({ focused, tabTintColor, tabActiveTintColor }) => (
<Icon
name="ios-flash"
size={24}
style={{
color: focused ? tabActiveTintColor : tabTintColor,
}}
/>
)}
/>
</BottomNavigation>
)}
/>
</Switch>
- Go to Actions Tab
/actions
- Tap on Link that takes user to
/action-funnel
(outside of bottom navigation) - Tap a link that takes the user back to
/actions
(usingthis.props.history.goBack()
) - Switch to Accounts Tab (or any other tab)
- Switch back to Actions Tab
/actions
- The screen is still showing the
/action-funnel
navigation and view.
What is the expected behavior?
It should show the Actions Tab view instead of Actions Funnel.
Environment (include versions). Did this work in previous versions?
- Device:
iPhone 6
- OS:
iOS
- React-Native (version):
0.54.1
- React-Router (version):
4.2.0
- React-Router-Navigation (version):
1.0.0-rc.4
This error is related to a library design problem. I'm fixing that on the dev
branch. But it requires a lot of refactoring and I don't have much time to fix it. I hope to finish in the coming weeks.