Answers for "how to render first three element using map"

0

how to render first three element using map

// ...inside the render() function

var size = 3;
var items = list.slice(0, size).map(i => {
    return <myview item={i} key={i.id} />
}

return (
  <div>
    {items}
  </div>   
)
Posted by: Guest on July-03-2021

Code answers related to "how to render first three element using map"

Browse Popular Code Answers by Language