title: Property 'name' does not exist on type 'string'. How do I declare an object for a React Axios Get Request?
body: <p>I am trying to use axios to GET data from an API and display it in the view using hooks. I am getting a successful response from the API, but I don't know how to integrate type into the request. The API gives me back an object so that's how I want to declare my response variable (like the 'Gateway' interface below)</p>
  <pre><code>const Gateways: React.FC = () =&gt; {
    
   interface Gateway {
      id: number;
      name: string;
    }
  
    const [gateway, setGateway]  = useState('');
  
    const handleClick = async () =&gt; {
      axios.get(&quot;my/url&quot;)
        .then((response) =&gt;
          setGateway(response.data)
        ).catch(error=&gt;console.log(error));
    };
  
    return (
      &lt;div className=&quot;content&quot;&gt;
        &lt;div&gt;{ gateway.name }&lt;/div&gt; //error is here: Property 'name' does not exist on type 'string'.
   )
  };
  
  export default Gateways;
  </code></pre>
  <p>Thank you!!</p>