import personServices from "../services/persons"; function Persons({ persons, setPersons }) { function onDelete(id) { personServices .remove(id) .then(setPersons(persons.filter((pred) => pred.id != id))); } return (