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

Transitions don't occur if navigating immediately after load #200

Open
njdancer opened this issue Jun 27, 2019 · 0 comments
Open

Transitions don't occur if navigating immediately after load #200

njdancer opened this issue Jun 27, 2019 · 0 comments

Comments

@njdancer
Copy link

Hello there, Love the API. Decided to try and use it to transition from our splash screen to login. Essentially I have a fluid navigator which has a default screen that visually replicates our static splash screen with our app logo configured as a shared element. We then have this same element on the login screen. The splash screen is able to check the current auth status and navigate to the appropriate screen. In theory this should transition the logo to its position on the next screen and if we artificially create a short delay after loading this works perfectly. If we do this immediately however the transition never occurs. I tried moving this into useLayoutEffect as I assumed it wasn't working as the SplashScreen was never being laid out and therefore the transition doesn't know its start position but this didn't change anything.

useEffect(() => {
  setTimeout(() => {
    SplashScreenAPI.hide()
    navigation.navigate(userStore.username ? "Main" : "Landing")
  }, 100)
})```

This is currently working fine as a workaround so I'm not inclined to spend a lot of time digging through the source to find the cause, however, may take a look if you had any ideas on where to start.
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

1 participant