I use this for expo-router
, this solution is page specific
const Login = () => {
const navigation = useNavigation();
useEffect(() => {
navigation.setOptions({ headerShown: false });
}, [navigation]);
return (
// code here
)
}
Source: https://docs.expo.dev/router/advanced/stack/#statically-configure-route-options