-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with SafeAreaProvider around Screen #556
Comments
Same issue |
Avoid using the hooks because they’re more delayed than the components |
Actually the issue was with the components, I gave the hook values just as an additional information |
@flodlc what version are you using? |
I just tried with last version and it seems tom work now ! |
Wow 5.0.0 seems to (finally) fix this flickering bug |
@JedrekDabrowski Sorry to come back to this, but it seems the bug still persists. Version 5 significantly reduces the delay before getting the correct values, but there is still an initial render with 0 insets before the correct inset values are applied. How does SafeAreaView differs from useSafeAreaInsets behind the scene? If it works with useSafeAreaInsets it should only work better with SafeAreaView? I miss something I guess. |
I still see it indeed! |
@RichardLindhout, could you share a short video just to be sure we talk about the exact same bug ? |
@flodlc I guess we are on the same page. I were able to fix it by using zoontek/react-native-edge-to-edge with react-native-safe-area-view with lates version 4. |
@JedrekDabrowski your library is for Android right? The issue is on iOS. I will try to make some video's next week. and it don't happens if i don't use safeareaprovider + safearea insets/view inside my bottom tab but then the bottom fab button of my app is not correctly displayed. |
Hi,
To account for the bottom menu, I use a SafeAreaProvider around the screens.
The issue is that the insets are incorrect during the navigation animation (using NativeStack in my case).
Here is the result of useSafeAreaInsets when the position is wrong:
{"bottom": 0, "left": 0, "right": 0, "top": 0}.
Once the animation is complete, the insets are correct:
{"bottom": 0, "left": 0, "right": 0, "top": 59}.
I tried giving initialMetrics but they are overridden during the animation with 0.
If a don't wrap the screen with a provider, I lose the correct bottom insets in my components.
Simulator.Screen.Recording.-.iPhone.15.-.2024-11-26.at.17.08.06.mp4
The text was updated successfully, but these errors were encountered: