i have problem here, when i click into one element 2 times it will add 2 time into my array, i dont know how to add unique element into array, can u guys help me? Thank you guys
const handleClick = (
id: number,
name: string | null,
avatar: string | null
) => {
setListChoose((prevState: any) =>
[...prevState].concat({ id, name, avatar })
);
};

idas the key.idsupposed to be unique?