Use with a local file

前端 未结 10 821
醉梦人生
醉梦人生 2021-02-01 01:56

The documentation says that the only way to reference a static image is to use require.

But I\'m not sure where does react expect to have those images. The examples don

10条回答
  •  情歌与酒
    2021-02-01 02:03

    I had this exact same issue until I realized I hadn't put the image in my Image.xcassets. I was able to drag and drop it into Xcode with Image.xcassets open and after rebuilding, it fixed the problem!

提交回复
热议问题