问题标签 [imagebackground]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - 在 ImageBackground 中添加要要求的变量
我正在使用来自 react-native lib 的 ImageBackground。ImageBackground 使用 source={require('asd.png')} 例如。
但我试图在里面添加变量来要求。
但我收到错误。第 122 行的无效调用:require(image)
javascript - ERROR : undefined is not an object (evaluation 'style.width')
Hello everyone I'm having trouble with component and I get an undefined error message.So my app has 2 screen,the first one has a list of imagebackgrounds and when you press on one of the images you get a description of that image on another screen.So on this second screen I get the image that I pressed on in an image component (not background). The problem I'm having is that when I save I get the undefined error.
First screen component :