I am getting data from sharepoint list using pnpjs and adding it to table. here when i am returning this pnp js getting below error.
Please find the below code for the same.
- private async getListData(){
- return await pnp.sp.web.lists.getByTitle("EmployeeDetails").items.select().get().then(allitems=>{
- return allitems.map(val=>{
- <tr key={val.ID}>
- <td>{val.Title}</td>
- <td>{val.PhoneNumber}</td>
- <td>{val.Address}</td>
- <td>{val.Department}</td>
- </tr>
- });
- });
- }