Created
January 28, 2019 05:16
-
-
Save aloukissas/1fe04ca6cdcbe7be507575abbe7b9920 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loadAppResources = async () => { | |
SplashScreen.hide(); | |
const fonts = [ | |
require("./assets/fonts/Roboto.ttf"), | |
require("./assets/fonts/Roboto_bold.ttf"), | |
require("./assets/fonts/Roboto_medium.ttf") | |
]; | |
const cachedFonts = fonts.map(font => { | |
return Asset.loadAsync(font); | |
}); | |
await Promise.all(cachedFonts); | |
this.setState({ isAppReady: true }); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment