title: onChangeText returning object Object instead of the value
body: <p>I want to change the data fetched from an API by changing the endpoint of the URL in react native. I have tried several ways but I an getting [object Object] at the end instead of the query.
  It can be seen in the console.log(baseurl) statement in line 52.
  Here is my code.</p>
  <pre><code>import React, { useEffect, useState } from 'react'
  import {View, Text, ActivityIndicator, StatusBar, StyleSheet,  Linking, ScrollView, SafeAreaView} from 'react-native';
  import { TextInput } from 'react-native-gesture-handler';
  
  function Update() {
    const [data, setData]= useState([]);
    const [loading, setLoading]= useState(true);
    const [query, setQuery]= useState(&quot;&quot;);
  
    const baseurl=&quot;https://api.adzuna.com/v1/api/jobs/in/search/2?app_id=6fb4d871&amp;app_key=51579f6594c9d91943719f071dfcff72&amp;results_per_page=15&amp;what_and=&quot;+{query};
  
  function getData() {
      return (
        fetch(baseurl)
        .then((response)=&gt; response.json())
      )
    }
  
    useEffect(()=&gt;{
      getData()
      .then((responseJson)=&gt;{
       setData(responseJson.results),
       setLoading(false)
      }) 
      .catch(err=&gt; console.log(err))
    },[]);
  
      if(loading) {
        return (
          &lt;ScrollView style={{flex: 1, padding:10}}&gt;
            &lt;ActivityIndicator/&gt;
          &lt;/ScrollView&gt;
        ) 
        
       }else{
         let updates= data.map((val, key)=&gt;{
           return &lt;View key={key} &gt;
             
             &lt;Text style={styles.head}&gt;{val.company.display_name}&lt;/Text&gt;
             &lt;Text style={styles.type}&gt;{val.contract_type}&lt;/Text&gt;
             &lt;Text style={styles.location}&gt;{val.location.area}&lt;/Text&gt;
             &lt;Text style={styles.desc}&gt;{val.description}&lt;/Text&gt;
             &lt;Text style={styles.link}
                  onPress={() =&gt; Linking.openURL(val.redirect_url)}&gt;
              Read more..
            &lt;/Text&gt;
           &lt;/View&gt;
         })
  
        return (
          &lt;ScrollView style={styles.container}&gt;
            &lt;TextInput value={query} onChangeText={(query)=&gt;{setQuery(query), console.log(query), console.log(baseurl)}}  
            style={{ height: 40, borderColor: 'gray', borderWidth: 1 }}/&gt;
            &lt;Text style={styles.top}&gt;Here's your weekly Job update! &lt;/Text&gt;
             {updates} 
          &lt;/ScrollView&gt;
          
         )
       }
    }
  
  export default Update;
  </code></pre>
  <p>Any help will be highly appreciated.
  Thanks!</p>