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

Cannot find name "T" Typescript

$
0
0

Why I get this error message:

Cannot find name "T"

Code:

const List: React.FC<T> = ({ items, render }: {  items: T[];  render: (item: T) => React.ReactNode;}) => {  return (<View>      { items.map((el ,i) => (<Text key={i}>{el}</Text>      )) }</View>  )}

What I am doing wrong ?


Viewing all articles
Browse latest Browse all 6287

Trending Articles