Filtr tablicy JavaScript duplikatów w React

const uniqueNames = names.filter((val,id,array) => array.indexOf(val) == id);
Disturbed Dolphin