TabNavigator / redux with dynamic route configs
问题 I'm developing a react-native app with a bottom-tab-navigator, and would like navigation options to depend on the screen being displayed, something like: AppNavigator.js: class AppNavigator extends React.Component{ isRouteEnabled = (routeName) => { return this.props.route == routeName; } render() { const tabNavigator = createBottomTabNavigator({ Home: HomeScreen, Screen2: Screen2, // tab to be conditionally displayed ...(this.isRouteEnabled('Screen3') ? { Screen3 : Screen3} : {}) }); const