Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

foreach in react

You need to pass an array of element to jsx. 
The problem is that forEach does not return anything (i.e it returns undefined).
So it's better to use map because map returns an array:

***
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #foreach #react
ADD COMMENT
Topic
Name
7+2 =