List Rendering in React

preview_player
Показать описание
Rendering lists in React can be a little tricky, but it works just like vanilla JavaScript. When rendering a list directly in the template, you must use the map() function as it returns a view. The forEach() works similarly except it doesn't return data so it won't do you any good. However, you can use all types of loops outside of the template to build a list of components and render the list object to the view.

⭕ About me

⭕ My complete online training courses:

⭕ Check out my book:
Developing Business Applications for the Web: With HTML, CSS, JSP, PHP, ASP.NET, and JavaScript is available on Amazon and MC Press.
Рекомендации по теме