StackNavigator through Component gives undefined error

Since your Test component does not belong to navigation stack it doesn’t have the navigation prop. You can do couple of things. Simple one is to pass the navigation to the child component like the example below. return ( <View> <Text>Hello, Chat App!</Text> <Button onPress={() => navigate(‘Chat’, { user: userName })} title={“Chat with ” + … Read more