Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async _loadAssetsAsync() {
const imageAssets = this._cacheImages([
require('./assets/videoplayer/thumb.png'),
require('./assets/videoplayer/track.png'),
]);
const fontAssets = this._cacheFonts([
fonts,
EvilIcons.font,
FontAwesome.font,
Ionicons.font,
MaterialIcons.font,
Foundation.font,
]);
try {
await Promise.all([
Store.rehydrateAsync(),
...imageAssets,
...fontAssets,
]);
Store.dispatch({ type: 'SET_DATA', data: Data });
} catch (e) {
console.log('Error downloading assets', e);
Sentry.captureException(e);
}
this._downloadManager = new DownloadManager(Store);
this.setState({ appIsReady: true });