Skip to content

Instantly share code, notes, and snippets.

@aloukissas aloukissas/App.js
Created Jan 28, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.