title: on Click of Submit button , Need to populate the Whole placename field from API into Input box, using Reactjs
body: <p>I am giving city name(ex: Chicago) in the Input box and Clicking on the submit button ,  now I am getting some Response from API, Now I Need to populate the Whole placename field from API into Input box when I click on that Submit Button (Ex :  It should be like &quot;Chicago, Illinois, United States&quot; into the Input box)... How can I Populate the Whole Address into the InputBox from API?
  Can anyone help me in this?</p>
  <p><a href="https://i.stack.imgur.com/yrAOw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yrAOw.png" alt="Here you can find the PlaceName field" /></a></p>
  <p>Here is my Component</p>
  <pre><code>import React, { useState } from 'react'
  import { useDispatch, useSelector } from 'react-redux';
  import * as getallcoordiantes from '../../src/Redux/googlemaps/bigbasket.actions';
  
  const GetGeoCoordinates = () =&gt; {
  
      const [storeDetails, setstoreDetails] = useState({
          name: &quot;&quot;
      })
      const dispatch = useDispatch();
      const storeInfo = useSelector((state) =&gt; state.fetchAllData)
      //console.log(storeInfo)
  
      const hanldeChange = (e) =&gt; {
          let newStoreDetails = { ...storeDetails };
          newStoreDetails[e.target.name] = e.target.value;
          // console.log(newStoreDetails);
          setstoreDetails(newStoreDetails)
      }
  
      const getStoreDetails = () =&gt; {
          dispatch(getallcoordiantes.fetchcoordinates(storeDetails.name))
      }
  
  
    return (
      &lt;div&gt;
      &lt;h2&gt;Search For Store&lt;/h2&gt;
      &lt;form&gt;
          &lt;input type=&quot;text&quot; name=&quot;name&quot; value={storeDetails.name} onChange={(e) =&gt; { hanldeChange(e) }} /&gt;
          &lt;button onClick={getStoreDetails} type=&quot;button&quot;&gt;Get Location&lt;/button&gt;
      &lt;/form&gt;
  &lt;/div&gt;
    )
  }
  
  export default GetGeoCoordinates
  </code></pre>