Javascript – How to render Iterating an object in html in react js
My Dashboard component is a arrow function as shown below const Dashboard= (props) => { //users object is fetched return( <ul> { Object.keys(users).forEach((key,index) => { console.log("iterating------>"+users[index].name);//this is iterating return <li key={key}>hello</li>//this is not rendering }) } </ul> ) } This…