Created
November 6, 2016 10:09
-
-
Save adnaan/70ef67fef47307bad414e6127de93940 to your computer and use it in GitHub Desktop.
This file contains 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
/*@flow*/ | |
import React from 'react'; | |
import Product from './Product'; | |
function ProductList(props: { data: Array < { ID: number, title: string, vote: number } > , dispatch: Function }) { | |
return ( | |
<div > | |
{ | |
props.data.map(product => <Product | |
key={product.ID} | |
id={product.ID} | |
title={product.title} | |
vote={product.vote} | |
dispatch={props.dispatch} | |
/>) | |
} | |
</div> | |
); | |
} | |
export default ProductList; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment