title: How to pass the handler function to the another screen in React Native
body: <p>I have problem passing the handler function to the second screen it says that HandleChangeFirstName is not a function or undefined.</p>
  <p>Question: Is it possible to update the parent state from the second screen?</p>
  <p>Goal: To update the state on the first screen</p>
  <p>First Screen Code:</p>
  <pre><code>    const HandleChangeFirstName = (e, i) =&gt; {
          let newArr = [...BookingData];
          newArr[i]['dest_firstname'] = e;
          setBookingData(newArr);
      }
  
      &lt;TouchableOpacity onPress={() =&gt; navigation.navigate('BookingDestination', {
          dest_data: BookingData[i],
          HandleChangeFirstName:HandleChangeFirstName
      })}&gt;
          &lt;Icon
              as={IconAnt}
              name={&quot;edit&quot;}
              size={5}
              color={'#FF403D'}
              mr=&quot;3&quot;
          /&gt;
      &lt;/TouchableOpacity&gt;
  </code></pre>
  <p>Second Screen Code:</p>
  <pre><code>const { dest_data, HandleChangeFirstName } = route.params;
  
  &lt;Text p=&quot;1&quot; fontWeight=&quot;500&quot; fontSize=&quot;13&quot;&gt;First Name&lt;/Text&gt;
  &lt;TextBox
      onChangeText={(e) =&gt; HandleChangeFirstName(e, 0)}
      value={dest_data?.dest_firstname}
      name=&quot;firstname&quot;
      placeholder=&quot;First Name&quot;
      size=&quot;lg&quot;
      isDisabled={dest_data?.isSearchSelected ? true : false}
      fontSize=&quot;12&quot;
      placeholderColor=&quot;#000&quot;
      fontWeight=&quot;300&quot;
      icon=&quot;user&quot;
      iconColor=&quot;#1E89D6&quot;
  &gt;
  &lt;/TextBox&gt;
  </code></pre>
  <p>Error:</p>
  <p><a href="https://i.stack.imgur.com/J46NB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J46NB.png" alt="Error" /></a></p>