Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react map component in

render() {
	return (
      	// using a arrow function get the looping item and it's index (i)
		this.state.data.map((item, i) => {
		  <li key={i}>Test</li>
		})
	);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #map #component
ADD COMMENT
Topic
Name
4+6 =