title: function not getting passed as part of props in react native
body: <p>I have following code for a drawer navigator that is being shown from App component. I am trying to pass a property <code>saveUser</code>  that points to a local function from App component to the MyDrawer component, but its always undefined in MyDrawer function. However, when I pass a string property <code>userName</code> to MyDrawer then that gets passed.</p>
  <p><strong>Question</strong></p>
  <p>Why is function not being passed as part of props from App component to MyDrawer function even though userName is getting passed?</p>
  <p><em>App.js snippet</em></p>
  <pre><code>const Drawer = createDrawerNavigator();
  
  function MyDrawer(props) {
     alert(&quot;in MyDrawer function : props.saveUser is &quot; + props.saveUser);
     alert(&quot;in MyDrawer function : props.userName is &quot; + props.userName);
    return (
      &lt;Drawer.Navigator
        drawerContent={(props) =&gt; &lt;CustomDrawerContent {...props} /&gt;}&gt;
        &lt;Drawer.Screen name=&quot;Home&quot; component={HomeStack} /&gt;
        &lt;Drawer.Screen
          name=&quot;Create Task&quot;
          component={CreateTaskStack}
          initialParams={{ saveUser: props.saveUser }}
        /&gt;
      &lt;/Drawer.Navigator&gt;
    );
  }
  
  export default function App() {
    const setUser = () =&gt; {
      alert('User will be set in this function');
    };
    setUser.bind(this);
    return (
      &lt;NavigationContainer&gt;
        &lt;MyDrawer saveUser={this.setUser} userName=&quot;sunil&quot; /&gt;
      &lt;/NavigationContainer&gt;
    );
  }
  </code></pre>