In the stack navigator section in the official docs, there is no information to inform the developer that the screenOptions prop can be a function not just an object