<?xml version="1.0" encoding="UTF-8"?><oembed><type>video</type><version>1.0</version><html>&lt;iframe src=&quot;https://www.loom.com/embed/0f3ee78215104e7faaffc6c352bdd407&quot; frameborder=&quot;0&quot; width=&quot;1728&quot; height=&quot;1296&quot; webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;</html><height>1296</height><width>1728</width><provider_name>Loom</provider_name><provider_url>https://www.loom.com</provider_url><thumbnail_height>1296</thumbnail_height><thumbnail_width>1728</thumbnail_width><thumbnail_url>https://cdn.loom.com/sessions/thumbnails/0f3ee78215104e7faaffc6c352bdd407-00001.gif</thumbnail_url><duration>567</duration><title>Common Interview for ReactJS</title><description>// TODO(s):
// update this code so that when you click on a user, they are removed from the screen
// add a number dropdown to fetch a dynamic number of users - for example, now we only fetch 5 users at a time - make it so we can fetch 5, 10 or 15 users based on the dropdown

import { useEffect, useState } from &quot;react&quot;;
import &quot;./styles.css&quot;;

export default function App() {
  const [users, setUsers] = useState([]);

  const API_URL = &quot;https://randomuser.me/api/?results=5&quot;;

  const fetchData = async () =&gt; {
    const res = await window.fetch(API_URL);
    const json = await res.json();
    setUsers(json.results);
  };

  useEffect(() =&gt; {
    fetchData();
  }, []);

  return (
    &lt;&gt;
      Users
      {users.map((user) =&gt; (
        
          
          {user.name.first}
        
      ))}
    
  );
}</description></oembed>