title: Display latitude and Longitude from MapBox API using Reactjs
body: <p>I am Unable to Display latitude and Longitude on the webpage, when I searched with city/state,
  Need to get those values and display on the browser, Should I need to change anything in the code
  Please help me in this . Thanks in advance</p>
  <p>Here is my code :</p>
  <pre><code>import React,{useState} from 'react'
  
  const useInput = (initialvalue) =&gt; {
      const [value, setvalue] = useState(initialvalue);
  
      const handleChange = async (event) =&gt;{
          setvalue(event.target.value);
        try{
        const endPoint = `Map Box API Goes here`
        const response =  await fetch(endPoint); 
        const results =   await response.json();
        console.log(results);
        } catch(error){
            console.log(error)
        }
    }
    
      return {
        value,
        onChange: handleChange,
        setvalue
      };
  }
  
  export default useInput
  </code></pre>
  <p><a href="https://i.stack.imgur.com/kVsmC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kVsmC.png" alt="Here you can find the coordinates, I need to display that on broswer" /></a></p>
  <p>here is the input search box</p>
  <pre><code>import React,{useState} from 'react';
  import useInput from '../Mapboxgeocoding/useInput';
  
  const MapInput = () =&gt; {
      const address = useInput(&quot;&quot;);
    return (
      &lt;div&gt;
          &lt;input placeholder='address' {...address} /&gt;
         
      &lt;/div&gt;
    )
  }
  
  export default MapInput
  </code></pre>