-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
chore(splash): upstream Expo Router splash screen changes #24893
chore(splash): upstream Expo Router splash screen changes #24893
Conversation
This can also be used for any other async setup we want to add in the future.
…ter` to `expo-splash-screen`.
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. before merging the pr, please help to resolve the expo-router ci sdk failure.
Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines. I've found some issues in your pull request that should be addressed (click on them for more details) 👇
|
# Why Expo Router has the ability to delay dismissing the splash screen until additional async work has finished, this functionality could also be used for other features like font loading in the future. Regardless, the changes are pretty light and add some additional value to non-router users, so it makes sense to move them upstream. <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How - Pull in native-only code for delaying the splash screen hiding (when the user hasn't already done this themselves) and attempting to hide when internal tasks have completed. - Memoize `preventAutoHideAsync` to prevent extraneous warnings. - Wrap the `hideAsync` warning to prevent extraneous warnings. We have no way of detecting if the splash has already been hidden so this is the only option. - Add additional error utils to hide the splash screen if an error was thrown, preventing the state where a splash screen hides error info. - Make `expo-router` SplashScreen just a re-export of `expo-splash-screen`. <!-- How did you build this feature or fix this bug and why? --> # Test Plan Manually tested in `apps/router-e2e`. --------- Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Why
Expo Router has the ability to delay dismissing the splash screen until additional async work has finished, this functionality could also be used for other features like font loading in the future. Regardless, the changes are pretty light and add some additional value to non-router users, so it makes sense to move them upstream.
How
preventAutoHideAsync
to prevent extraneous warnings.hideAsync
warning to prevent extraneous warnings. We have no way of detecting if the splash has already been hidden so this is the only option.expo-router
SplashScreen just a re-export ofexpo-splash-screen
.Test Plan
Manually tested in
apps/router-e2e
.