- 5
Fill in the blanks to create a valid component that iterates through the received props array and returns <p> elements for each
3 Respuestas
+ 1
Here is the solution:
function MyList(props) {
const arr =
props
.data;
const listItems = arr.
map
((val) =>
<
p
>{val}</p>
);
return
<div>{listItems}</div>;
}
0
props
map
p
return
- 1
is the JS? or HTML?