Skip to content
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

Question: How do you enable the splash screen. #20

Closed
rodwin opened this issue Dec 5, 2018 · 2 comments
Closed

Question: How do you enable the splash screen. #20

rodwin opened this issue Dec 5, 2018 · 2 comments

Comments

@rodwin
Copy link

rodwin commented Dec 5, 2018

Running the project, it directly loads the Example screen.

Thanks

@JeremyDolle
Copy link
Collaborator

Hi @rodwin ,

This is a normal behavior since there is nothing to load (in startupSaga). There is an automatic redirection at the end of the startupSaga

...
export function* startup() {
  ...
  NavigationService.navigateAndReset('MainScreen') // <--- this line here
}

Fetching the temperature data is too fast to let you see the splash screen. Try to add a setTimeout in order to simulate a long fetching.

in /App/Sagas/StartupSaga.js

...
export function* startup() {
...
  setTimeout(() => {NavigationService.navigateAndReset('MainScreen')}, 3000)
}

I expect this to work and let you see the splash screen for 3 seconds.

@rodwin
Copy link
Author

rodwin commented Dec 6, 2018

Awesome. Thanks for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants