Have been facing issue while iterating through a list and printing elements in React.
The React Code is:
import React from \'react\'; import ReactDOM fro
I think you are missing the return in renderList -> .map
This should work.
renderList() { return this.state.myData.map((item) => { return ( {item.title} {item.description} ); }); } render() { if(this.state.myData.length){ return ( {this.renderList()} ); } else { return ( Loading... ); } }
{item.description}