Skip to content
Advertisement

How to navigate from splash screen to Onboarding Screens?

This is SplashScreen.js page

I want to get the splash screen displayed and goes invisible by a timeout and then navigate to Onboarding Screen (sliding splash screens)

JavaScript

Advertisement

Answer

Try like this

JavaScript

I set an alert when navigation happens for now. You can change it to redirect.

In your App.js you need to have a stackNavigator setup like below which gives the navigation prop.

JavaScript

Code sandbox => https://codesandbox.io/s/cool-violet-7lqqr?file=/src/App.js

Advertisement