title: navigation.setOptions not change
body: <p>i'm creating screens with react-navigator but i can not change the options of the Header Bar when screen opened</p>
  
  <p>My code (App.js):</p>
  
  <pre><code>function App() {
    return (
      &lt;NavigationContainer&gt;
        &lt;Stack.Navigator screenOptions={{
          headerTitleAlign: 'center',
          headerTitle: props =&gt; &lt;LogoTitle {...props} /&gt;,
          headerRight: props =&gt; &lt;HeaderRight {...props} /&gt;,
          headerStyle: {
            backgroundColor: '#F46A0D'
          },
          headerTintColor: '#fff',
        }}&gt;
          &lt;Stack.Screen name="Search" component={SearchScreen}/&gt;
        &lt;/Stack.Navigator&gt;
      &lt;/NavigationContainer&gt;
    );
  }
  
  export default App;
  </code></pre>
  
  <p>My SearchScreen.js:</p>
  
  <pre><code>import React from 'react'
  import { Text, View } from 'react-native'
  import { Button } from 'react-native-paper'
  
  const SearchScreen = ({ navigation }) =&gt; {
      navigation.setOptions = {
          headerTitle: props =&gt; &lt;TextInput {...props} placeholder="Search" placeholderTextColor="#FFFF" style={{
              fontSize: 24
          }}&gt;&lt;/TextInput&gt;,
          headerRight: props =&gt; &lt;FontAwesome5 {...props} name={'search'} size={22} color="white" style={{ marginRight: 15 }}&gt;&lt;/FontAwesome5&gt;
      }
      return (
          &lt;View&gt;
          &lt;/View&gt;
      )
  }
  
  export default SearchScreen;
  </code></pre>
  
  <p>in the navigation.setOptions line nothing happens and the default screenOptions Stack.Navigator continues</p>