我正在try 添加react native BackgroundImage的背景图像,需要将源添加为source={require('*--iamge path --*')}
但我的eslint抛出Require statement not part of import statement.个错误.我try 过以不同的方式导入图像,例如:
- const image = '--image path--'
- import image = require('--image path--')
- <BackgroundImage source={require('--image path--')}>