I dynamically set the "headerShown" screen option but I can't sort out how to read the options from within a functional component
<Stack.Navigator
screenOptions={{
headerShown: showHeader
}}>
Ive tried the navigation, route and state objects from within the component using useNavigation, useRoute and useNavigationState respectively and none seem to have a way to get the screen option values.