Skip to content

Instantly share code, notes, and snippets.

@codewithbernard
Created December 8, 2021 09:35
Show Gist options
  • Select an option

  • Save codewithbernard/d1cacb38f9288bfd6e25cb2ce8846613 to your computer and use it in GitHub Desktop.

Select an option

Save codewithbernard/d1cacb38f9288bfd6e25cb2ce8846613 to your computer and use it in GitHub Desktop.
import uniq from "lodash/uniq";
const users = ["Aaron", "John", "Mary", "John", "Angel", "Mary"];
const Users = () => {
return (
<div>
<strong>Unique names</strong>
<ul>
{uniq(users).map((user) => (
<li>{user}</li>
))}
</ul>
</div>
);
};
export default Users;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment