title: I am getting Uncaught (in promise) AxiosError while rendering a react component from backend
body: <p>Uncaught (in promise)
  AxiosError {message: 'Request aborted', name: 'AxiosError', code: 'ECONNABORTED', config: {…}, request: XMLHttpRequest}</p>
  <pre><code>import React, { useEffect, useState } from 'react';
  import axios from 'axios';
  const ChatPage = () =&gt; {
      const [chats, setchats] = useState([]);
      const fetchChats = async () =&gt; {
          const {data} = await axios.get('/api/chat');
          setchats(data); 
      };
      useEffect(() =&gt; {
        
       fetchChats();
        
      }, []);
      
    return 
      (&lt;div&gt;{chats.map((chat) =&gt; (&lt;div&gt;{chat.chatName}&lt;/div&gt;))}&lt;/div&gt;);
    
  }
  
  export default ChatPage
  </code></pre>