RNBootSplash with react-native-auth0 not working on Android? #530
Unanswered
VilleMiekkoja
asked this question in
Q&A
Replies: 1 comment 18 replies
-
@VilleMiekkoja There no need to call const IntroScreen: React.FC<IntroScreenProps> = ({
navigation,
}) => {
useEffect(() => {
RNBootSplash.hide({ fade: false });
}, []);
return <Text>Is this visible?</Text>;
}; |
Beta Was this translation helpful? Give feedback.
18 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a react-native project with react-native-bootsplash. I'm using
useEffect
for hiding the screen like this:The setup is so that when user arrives to this page, the splash-screen has already been hidden before in the previous page. From the previous page we move to this page, and then the splashscresn stays on (without logo, just the splashscreen background color on full screen). There's also auth0 login before we move from the previous page (that is a login page). Not sure if it affects to this. But if I comment the whole useEffect out, then there's no issue. But why do I then want to try hiding it in this page if it has already been hidden in the previous page? That is because in some cases this page might be the first page already (if user has logged in before). I could of course maybe send some kind of variable to this page that if we already know the bootsplash has been hidden, but I see no reason why the code above should not work on this situation as well. The issue only happens on android. On iOS it's working fine.
I will setup a workaround for this unless someone knows what I'm doing wrong? Is it not allowed to call isVisible() function if it has already been called once? I fear this might be some kind of timing issue. Here are the relevant library versions:
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"react-native": "0.72.3",
"react-native-bootsplash": "^5.1.3",
Android emulator: Pixel 2 API 33
Beta Was this translation helpful? Give feedback.
All reactions