I got stuck at a point where i want to do some nested navigation from child screen to another child screen. Below is my required stack navigation.
Home Screen -> Add User -> View Users -> No Users(Shown only incase no users found) -> Users List(Shown when users Data found) ->View Details
Below is the code which i tried to replicate the above stack navigator with nested navigation for ViewUsers. But i was confused in implementing from thishttps://reactnavigation.org/docs/nesting-navigators/
const HomeStack = createStackNavigator(); function UserDetailsRoot(){ return (<HomeStack.Navigator><HomeStack.Screen name="No Users" component={NoUsers} /><HomeStack.Screen name="Users List" component={UsersList} /><HomeStackScreen name="User Details" component={UserDetails} /></HomeStack.Navigator> ) } const HomeStackScreen = () => (<HomeStack.Navigator><HomeStack.Screen name="Home " component={HomeScreen} /><HomeStack.Screen name="Add User" component={AddUsers} /><HomeStack.Screen name="UserDetailsRoot" component={UserDetailsRoot} /></HomeStack.Navigator>);export default () => (<NavigationContainer><HomeStackScreen /></NavigationContainer>);
Any help is appreciated.Thanks.