Tuesday, September 25, 2018

javascript - Loop inside React JSX

I'm trying to do something like the following in React JSX (where ObjectRow is a separate component):





for (var i=0; i < numrows; i++) {

}



I realize and understand why this isn't valid JSX, since JSX maps to function calls. However, coming from template land and being new to JSX, I am unsure how I would achieve the above (adding a component multiple times).

No comments:

Post a Comment

plot explanation - Why did Peaches&#39; mom hang on the tree? - Movies &amp; TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...