title: TypeError: undefined is not an object (evaluating 'route.params')
body: <p>I have a Drawer Navigator set up, with various screens. </p>
  
  <p>On one screen, I have a FlatList with a simple TouchableOpacity like below:</p>
  
  <pre><code> &lt;TouchableOpacity
                onPress={() =&gt;
                  navigation.navigate("ViewProject", {
                    screen: "viewProject",
                    params: { projectID: item.projectID },
                  })
                }
              &gt;
   &lt;/TouchableOpacity&gt;
  </code></pre>
  
  <p>The navigation works, going to the viewProject screen, but no matter what I seem to try the route.params just doesn't seem to exist.</p>
  
  <pre><code>  export default function viewProject({ route }) {
    const projID = route.params?.projectID ?? 0; // ERRORS with TypeError: undefined is not an object (evaluating 'route.params')
    console.log(projID); 
  </code></pre>
  
  <p>}</p>
  
  <p>I'm using the latest React Native, Navigation etc and TypeScript. </p>
  
  <p>My only success is setting the initialRouteParams on the createStackNavigator that feeds into the drawer, and yet that's only accessible via navigation.state.params:</p>
  
  <pre><code>const screens = {
    viewProject: {
      screen: viewProject,   
      navigationOptions: ({ navigation }) =&gt; {
        return {
          headerTitle: () =&gt; (
            &lt;Header navigation={navigation} title={"View Project"} /&gt;
          ),
        };
      },
    },
  };
  
  const viewProjectStack = createStackNavigator(screens, {
    initialRouteParams: { projectID: 23 }, // This works, but it's static and I can't change it  
  });
  </code></pre>
  
  <p>Thanks in advance.
  Stewart</p>