selvi jp

selvi jp

  • 1.7k
  • 291
  • 16.2k

TypeError: Cannot read property 'map' of undefined

Aug 20 2021 7:17 AM

i want to display points but i have mapping error.

  this.state = {

      emps:[],

    }

{this.state.emps.map(emp=>

    <div id="foo">

     <span class="centered">{emp.points}</span>

  </div>

    )} 


Answers (2)