const popFromData = (memberID: number): void => { setData( data .filter(function(element: DataType) { return element.id !== memberID; })) }