Challenge: Fetch and Display Random Users from an API
Follow these instructions to complete your challenge:
- Create a functional component called
RandomUser
in the App.jsx
file.
- Use the useEffect hook to fetch a random user from the Random User API (https://randomuser.me/api/) when the component mounts.
- Display the user’s name, email, and profile picture.
- Add a "Fetch New User" button to fetch a new random user when clicked.
Expected Output