<Button onClick={(e)=>setId(_id); handleDelete()}>Delete
I tried this way, but it gives error.
<Button onClick={(e)=>setId(_id); handleDelete()}>Delete
I tried this way, but it gives error.
I think you must wrap the content of the arrow function in { }, like this
<Button onClick={(e) => {setId(_id); handleDelete()} }>Delete</Button>
and don't forget the closing tag for the Button component
I hope that solves your problem.