I was happy to find out I could do this (title
is not a Text prop):
<Text title={item.description}> {item.label}</Text>
On React Native, this does not show the description (which I con't care about for the moment) but on the web, it actually uses the title
attribute.But since converting my code to TypeScript, this results in a warning. So I tried the following:
<Text // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore title={item.description} style={textStyle}>
and the warning was gone. But is there a better solution? Relatively new on TypeScript here.