Skip to content

Instantly share code, notes, and snippets.

@janjakubnanista
Last active June 6, 2020 11:30
Show Gist options
  • Save janjakubnanista/d07bc16f21466a19a521e024ac3cc000 to your computer and use it in GitHub Desktop.
Save janjakubnanista/d07bc16f21466a19a521e024ac3cc000 to your computer and use it in GitHub Desktop.
export function Select<T>({ items }: SelectProps<T>) {
return <div>
{items.map(item => {
const selected = /* We now need to know how to check whether this item is the selected one */;
return <div key={/* We will also need to get a unique identifier from the type T */}/>;
})}
</div>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment