onRemove(id) is a function which filtering id that gets from parameter.
case 1) const namesList = names.map(name => ( {name.text}));
case 2) const name