Answers for "jsx render array"

0

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>
    );
  }
Posted by: Guest on October-08-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language