Skip to content

Tag: reactjs

create new array from nested array object

i want to create a new array from api, but i don’t know how to make it, i’m very confused in looping each array This is each data this is the main data of api i want to create a new array like this, bcs i want to create a new object containing the group_id of each same data in

Sending the id of the respective component through a click

I am trying to send the id of the respective object through an on-click event , yet I always end up being sent the synthetic onClick event , how can I change this ? How my array of objects looks like : My onClick={(id)=>handleOpen(id)} EDIT: It was recommended to change the renderig of the button in the fo…