Please provide the following:
- SDK Version: 48
- Platforms(Android/iOS/web/all): iOS
- Add the appropriate “Tag” based on what Expo library you have a question on.
I’m developing an application with a dark and a light theme, and custom fonts.
I’m trying to migrate everything to expo, but I have a problem: I get a white flash when I launch my application.
I did a lot of research to find out what was causing this, and concluded that using expo’s useFont hook could cause the problem.
Here’s a repository that reproduces the problem: GitHub - Thanaen/expo-router-font-white-flash
One solution would be to give a value to the “backgroundColor” property, in the app.json file, but this isn’t a good solution for two reasons:
- only one color can be set, and therefore cannot be adapted to the dark theme (unless you use expo-system-ui with the setBackgroundColor method)
- Setting a backgroundColor has a very ugly effect on iOS modals, so it’s best to leave this property undefined.
I’m a bit up against the wall with this problem :(.
PS: I’ve also created an issue on expo/router