headerLeft / headerRight / headerCenter disappearing when Android hardware back button functionality is used
See original GitHub issueDescription
We’re currently seeing an issue where if a user uses the hardware back button to pop off a screen the headerLeft
/ headerRight
/ headerCenter
properties of the screen are being unmounted while the screen is still visible.
Screenshots
Here’s a video of using the software back button to go back a screen (notice how the headerCenter
component (the Help Center title) stays visible throughout the entire transition)
https://user-images.githubusercontent.com/7979579/108112834-44e39600-705c-11eb-95f9-dc046943a843.mp4
Here’s a video of using the hardware back button to go back a screen (notice how the headerCenter
component (the Help Center title) is removed as the transition begins)
https://user-images.githubusercontent.com/7979579/108112877-59c02980-705c-11eb-9632-2ee189768fdd.mp4
Steps To Reproduce
- Use the hardware back button to pop from a screen with
headerLeft
/headerRight
/headerCenter
properties set on it
Expected behavior
The properties remain visible during the duration of the animation
Actual behavior
All properties disappear as the transition begins
Snack or minimal code example
Package versions
- React: 16.13.1
- React Native: 0.63.3
- React Native Screens: 2.17.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
@WoLewicki confirmed that fixed the issue! Thank you so much to both you and @msvargas for the fast follow up on this! 😄
Oh, I see, I’m sorry. The issue also points that the same happens in
react-native-fast-image
iirc. Can you provide a simple reproduction of the issue then?