Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jsx render array

render() {
    const data =[{"name":"test1"},{"name":"test2"}];
    const listItems = data.map((d) => <li key={d.name}>{d.name}</li>);

    return (
      <div>
      {listItems }
      </div>
    );
  }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jsx #render #array
ADD COMMENT
Topic
Name
5+5 =