Created
September 15, 2022 18:08
-
-
Save newerton/cd708cfb81408d2b7a18b21d4c427bea to your computer and use it in GitHub Desktop.
Interface segregation principle (ISP)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Video = { | |
title: string | |
duration: number | |
coverUrl: string | |
} | |
type Props = { | |
items: Array<Video> | |
} | |
const VideoList = ({ items }) => { | |
return ( | |
<ul> | |
{items.map(item => | |
<Thumbnail | |
key={item.title} | |
video={item} | |
/> | |
)} | |
</ul> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment