Wednesday, October 31, 2018

Iterating/Loop Through Your Component Property in Render Function in React

I understand that you need to build some UI elements dynamically in your component’s render function in React. Yes! the only way is to loop through the items, you can either use a for loop or a map function to do so. But the real question is, are we allowed to do that in react? Unfortunately, not in a direct way, you may face some difficulty especially if you come from an Angular background.

source https://www.c-sharpcorner.com/article/iteratingloop-through-your-component-property-in-render-function-in-react/

No comments:

Post a Comment