expo / expo/examples

Asset.fromURI expects a String, not an Object

Open
#366 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.7k
Forks
1.1k
Avg merge
11h 15m
Merged PRs (30d)
1

Description

**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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.