skip to Main Content

Why is the .map() function not iterating? – Reactjs

I am trying to iterate through my state via .map(), but the function stops after the first return: private renderEmployeesTable() { if (this.state.employees) { return new Array(this.state.employees).map((_, index) => { const employeeId: string | undefined = this.state.employees[index]?.employeeId; const employeeName: string…

VIEW QUESTION
Back To Top
Search