How to use the expo-asset-utils.cacheAssetsAsync function in expo-asset-utils

To help you get started, we’ve selected a few expo-asset-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EvanBacon / Expo-Voxel / App.js View on Github external
async preloadAssets() {
    await AssetUtils.cacheAssetsAsync({
      // fonts: this.fonts,
      files: this.files,
      // audio: this.audio,
    });
    this.setState({ loading: false });
  }
github EvanBacon / Sunset-Cyberspace / components / Preload.js View on Github external
async preloadAssets() {
    await AssetUtils.cacheAssetsAsync({
      fonts: this.fonts,
      files: this.files,
      audio: this.audio,
    });
    await AudioManager.sharedInstance.setupAsync();
    this.setState({ loading: false });
  }
github EvanBacon / Expo-Crossy-Road / src / AudioManager.js View on Github external
downloadAsync = async () =>
    AssetUtils.cacheAssetsAsync({
      files: [...AssetUtils.arrayFromObject(this.assets)],
    });
github expo / expo-asset-utils / example / _App.js View on Github external
async preloadAssets() {
    await AssetUtils.cacheAssetsAsync({
      fonts: this.fonts,
      files: this.files,
      audio: this.audio,
    });
    this.setState({ loading: false });
  }