Skip to content

Instantly share code, notes, and snippets.

@ioness
Created April 19, 2018 02:09
Show Gist options
  • Save ioness/21397b7610d9d6ea5870d07b90a75c44 to your computer and use it in GitHub Desktop.
Save ioness/21397b7610d9d6ea5870d07b90a75c44 to your computer and use it in GitHub Desktop.
import * as React from 'react'
interface Props {
indexes: [ number ],
component: any
}
export default function List (props: Props): any {
return props.indexes.map((index: number): any => {
return <props.component key={index} id={index.toString()}/>
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment