Concepts

JavaScript map for React list data

Creates an array of callback results. The result is not automatically a deep copy. React commonly uses it to transform data into elements.

Formal Syntax & Structure

react syntaxreact
JavaScript map for React list data

Working Example

Example Snippetreact
const labels = ["A", "B"].map(name => "Item " + name);
React Reference