(反应)警告ESLINT(反应本/无彩色)
我有这种风格的反应
backgroundColor: 'rgba(0, 0, 0, 0.8)',
,但它给了我这个Eslint警告警告Eslint(React-Native/no-color-Literals)
我尝试了这种样式,但它不起作用
{
backgroundColor: BLACK,
opacity: 0.8
}
I have this style in react-native
backgroundColor: 'rgba(0, 0, 0, 0.8)',
but It gives me this eslint warning Warning eslint(react-native/no-color-literals)
I tried this styling but it didn't work
{
backgroundColor: BLACK,
opacity: 0.8
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请检查此链接了解警告。
您可以在ESLINT上禁用此警告,也可以将字符串放入变量中。
进而:
Please check this link to understand the warning.
You can either disable this warning on eslint or put the string into a variable.
And then: