Select an item from dropdown and use that value in another component in React native
Just do something like this:
navigation.navigate('RouteName', { /* params go here */ })
You might want to read the following documentation: https://reactnavigation.org/docs/params/
You can do that like:
const onPress = () => {
try{
const topic = "Plant/type";
...
navigation.navigate('Air', {newTopic: topic}) //you can pass another value by separating with comma
}catch(err){
console.log(err)
}
}
Then you can fetch the same value in next screen like:
function NextScreen({ route, navigation }) {
const topic = route.params.newTopic
}
Hope this works for you.