Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

This expression is not callable using navigation in React Native TS

$
0
0

I'm getting this error when trying to define type Nav for navigation function:

const InfoLink = ({  componentName,  title,}: {  componentName: string;  title: string;}) => {  const navigation = useNavigation<Nav>();  return (<Pressable      style={styles.linkRoot}      onPress={() =>        navigation.navigate({ name: componentName, params: { useBack: true } })      }><View style={styles.linkContainer}><View><Text style={styles.linkText}>{title}</Text></View></View></Pressable>  );};export default InfoLink;

I tried looking for solution, I don't know what I'm doing wrong. Thx.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>