I have a list component, it works. But my question is, how can I say now which item should have items ?
Like
interface items { name: string; text: string; done: boolean;}
Code:
function UL<T>({ items, render, itemClick }: { items: T[], render: (item: T) => React.ReactNode, itemClick: (id: T) => void }) { return (<View> { items.map((el, i) => (<Pressable key={i} onPress={() => itemClick(el)}> {render(el)}</Pressable> )) }</View> )}