expo/examples

Asset.fromURI expects a String, not an Object

sylvio-ruiz opened this issue · 0 comments

Describe the bug
Bug: Asset.fromURI expects a String, not an Object
Example: with-splash-screen
File: ./App.js
Version: expo-asset@~8.4.6

To Reproduce
Just run the project

Expected behavior
Get the asset

Additional context

image={{ uri: Constants.manifest.splash.image }}

  const startAsync = useCallback(
    // If you use a local image with require(...), use `Asset.fromModule`
    // If you use remote image, use `Asset.fromURI'
    () => Asset.fromURI(image.uri).downloadAsync(), // replace image by image.uri
    [image]
  );

Fixed