Wednesday, 6 October 2021

Not able to hide react native splashscreen shown before AWS Authenticator

I'm showing the react native splashscreen and trying to hide it in useEffect, but the useEffect doesn't get called if I'm using AWS Authenticator in App.js. It works fine when I don't use the authenticator.

App.js

import Amplify from 'aws-amplify';
import config from './src/aws-exports';
import { withAuthenticator } from 'aws-amplify-react-native';
import Auth from '@aws-amplify/auth';
import SplashScreen from 'react-native-splash-screen';
import { useEffect } from 'react';

function App (){
  useEffect(() => {
    SplashScreen.hide();
  });

  return ( 
    <View>
    </View>
  );
};
export default withAuthenticator(App); 

It works fine without the Authenticator if I remove the last line.



from Not able to hide react native splashscreen shown before AWS Authenticator

No comments:

Post a Comment