react-native - Image require local path from JSON
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Hello comunity :) I am working on a testapp in react-native and try to get Images from a local storage place. Actual what i am doing: I give an image directlink source to a var and call this method at my render function. *react: ^0.14.8 ||* *react-native: ^0.23.1||* *npm: 2.15.1 ||* *node: v4.4.4* Working: ImageCall-File (Imagefile.js) var samplepicture; setPicture(){ samplepicture= require('./images/picture.png') } render() { this.setPicture; return( <Image source=samplepicture/> ); } The code snippet above works in a created class wich is