title: Display array list from api in React JS
body: <p>I am new to React and I am trying to display an array list from this api in an ordered list. This is the link where I am getting it from <a href="https://api.chucknorris.io/jokes/categories" rel="nofollow noreferrer">Chuck Norris</a>.</p>
  <pre><code>[
    &quot;animal&quot;,
    &quot;career&quot;,
    &quot;celebrity&quot;,
    &quot;dev&quot;,
    &quot;explicit&quot;,
    &quot;fashion&quot;,
    &quot;food&quot;,
    &quot;history&quot;,
    &quot;money&quot;,
    &quot;movie&quot;,
    &quot;music&quot;,
    &quot;political&quot;,
    &quot;religion&quot;,
    &quot;science&quot;,
    &quot;sport&quot;,
    &quot;travel&quot;
  ]
  </code></pre>
  <p>Here is my sample Code</p>
  <pre><code>import React from 'react';
  import PropTypes from 'prop-types';
  
  GetList.propTypes = {
      categoriesList: PropTypes.array,
  };
  GetList.defaultProps = {
      categoriesList:[],
  }
  
  function GetList(props) {
      const {categoriesList} = props;
      return (
          &lt;ul className=&quot;post-list&quot;&gt;
              {categoriesList.map(post=&gt;(
                  &lt;li&gt;&lt;/li&gt;
              ))}
          &lt;/ul&gt;
      );
  }
  
  export default GetList;
  </code></pre>
  <p>Here is the App.js code where I make the api call</p>
  <pre><code>function App() {
    const [categoriesList, setCategoriesList] = useState([]);
    useEffect(() =&gt; {
      async function fetchCategoriesList(){
        try{
          const requestUrl = 'https://api.chucknorris.io/jokes/categories';
          const response = await fetch(requestUrl);
          const responseJSON = await response.json();
          console.log(responseJSON);
          setCategoriesList(responseJSON);
        } catch {
  
        }
      }
  
      fetchCategoriesList();
    }, [])
    return (
      &lt;div className=&quot;App&quot;&gt;
        &lt;GetList /&gt;
      &lt;/div&gt;
    );
  }
  </code></pre>
  <p>It fetches the data and I can see it from console.log however it is not displaying. How can I go about displaying the list?.</p>