Passing Props to Another Screen Using React Navigation | React Native Course #8

preview_player
Показать описание
Yo! In todays video we're PUSHIN' P!!!! 😤😤😤😤😤😤😤😤 and we're also gonna be learning how to work with navigation props. and pass anime data to another screen on press. I hope you enjoy :D

Рекомендации по теме
Комментарии
Автор

goated video fr, i tried doing this a while ago and was struggling but this worked like a charm thanks man !

CollinMeCrazy
Автор

How about if you want to display the image?

ephratnegussie
Автор

Good video bro, How can i pass a function using Navigation and trigger the function with a condition in the second screen?

js
Автор

I am getting an error message saying 'useNavigation' is not a function. I have imported it in my react-native section like:

import {
StyleSheet,
Text,
View,
Image,
TouchableOpacity,
useNavigation
} from 'react-native';

I have placed my code into there for the useNavigation function

const GameShelf = () => {
useEffect(() => {
SplashScreen.hide();
}, []);

const navigation = useNavigation(); where I placed it.

return (

<View style={styles.container}>

<Text style =

<Image style = {styles.imageStyle} />

<TouchableOpacity activeOpacity={0.8} onPress = {() => {
navigation.navigate('RegisterScreen', {
registerPG: registerPage,
});
}}
style={styles.button}
>
<Text
</TouchableOpacity>


<TouchableOpacity activeOpacity={0.8}
style={styles.button1}
>
<Text
</TouchableOpacity>

</View>

);
}

Verum_Rex