Created
December 8, 2021 09:35
-
-
Save codewithbernard/d1cacb38f9288bfd6e25cb2ce8846613 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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