Why I get this typeerror message on renderItem?
Type 'ListRenderItem<IArr>' is not assignable to type 'ListRenderItem<unknown> | AnimatedNode<ListRenderItem<unknown> | null | undefined> | null | undefined'. Type 'ListRenderItem<IArr>' is not assignable to type 'ListRenderItem<unknown>'.
Code:
interface IArr { id: string; text: string;}const arr: IArr[] = [ { id: '1', text: 'DATA' }, { id: '2', text: 'SERVER' }, { id: '3', text: 'Auto' }, { id: '4', text: 'CENTER' }];const renderItem: ListRenderItem<IArr> = ({ item }) => { return (<View><Text>{item.text}</Text></View> )};export default function App() { return (<GestureHandlerRootView style={s.container}><AnimatedFlatlist keyExtractor={(i) => i.id} data={arr} renderItem={renderItem} /></GestureHandlerRootView> )}
What I am doing wrong ?
..............................................................................................................................