UseHeaderHeight() returns 0 initially if a custom header is used
Description
Current behavior:
The useHeaderHeight() returns 0 initially if a custom header is used. But once the device's orientation changes, it returns correct value. Im using native stack navigator. Please refer the uploaded screen recording. https://drive.google.com/file/d/1-CvfpQMP6c7j1Y2X_LJUjt53yJPrXp6Z/view?usp=sharing
Expected behavior:
It should return correct value for the height of custom header.
Steps to reproduce
- Clone The provided repo
- yarn install
- yarn android
- observe that the headerheight is 0 initially(even if there is a header) for the custom header. Once the device orientation changes, it returns the correct value
Snack or a link to a repository
https://github.com/AjayFrancisTechversant/dummyRepo
Screens version
4.11.1
React Native version
079.3
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Release mode
Device
Real device
Device model
Samsung Galaxy s9+
Acknowledgements
Yes
HI there ! In android the initial value of useHeaderHeight() is zero , but when the device is rotated , it will be returning correct value . In ios the initial value of useHeaderHeight() is correct, but when the device is rotated , the value will be changed to zero.