title: React Native - use sa state into a function
body: <p>I just want to use a state into an axios request (functional component), but doesn't work.</p>
  
  <pre><code> const [title, setTitle] = useState('');
  
  const updateTitle = title =&gt; {
      setTitle(title);
    };
    console.log(title); // comes from an input and work prefectly
  </code></pre>
  
  <p>I take the input with a button</p>
  
  <pre><code>&lt;Button title="Search" onPress={() =&gt; searchBook(title)} /&gt;
  </code></pre>
  
  <p>Function</p>
  
  <pre><code> const searchBook = ({title}) =&gt; {
      let key = '&amp;key=MYKEY';
  
      googlebooks
        .request({
          method: 'get',
          url:
            'https://www.googleapis.com/books/v1/volumes?q=' +
            title + // always undefined
            key,
        })
        .then(function(response) {
          console.log(response);
          setBookResults(response.data.items);
        })
        .catch(function(error) {
          console.log(error);
        });
    };
  </code></pre>
  
  <p>I don't get any result, but <code>title</code> is always undefined. Why?</p>