title: How do to pass parameter to a custom hook
body: <p>How do I pass a parameter from my return statement to the custom hook, I have created everything but just the method to pass the parameter to the custom hook is my problem.</p>
  <pre><code>  const {
        geodata: address,
        isPending,
        geoerror,}
      = useGeo(latitude, longitude);
    
  </code></pre>
  <p>You see <code>useGeo</code> that's the custom hook where I want to pass latitude and longitude (This works but I don't know to pass the parameter from the return statement)</p>
  <p>So I tried method like this:</p>
  <pre><code>  const getAddApi = (latitude, longitude) =&gt; useGeo(latitude, longitude);
  </code></pre>
  <p>and in the return statement I tried this below but it didnt work I keep getting <code>Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:</code></p>
  <pre><code>&lt;Text&gt;{getAddApi(item.latitude, item.longitude).geodata}&lt;/Text&gt;
  </code></pre>