'Error: Unknown named module', loading react-native image from a dynamic path

前端 未结 1 453
面向向阳花
面向向阳花 2021-01-17 09:32

When i use the Image component in React-native, it works fine when I declare my image\'s path/source as an inline string:

 

        
相关标签:
1条回答
  • 2021-01-17 10:11

    You cannot do dynamic static images, so you can either use uri or do static things like var test=require('image'). Have a look at this issue: https://github.com/facebook/react-native/issues/2481

    0 讨论(0)
提交回复
热议问题