reactjs - 警告:道具类型失败:提供给“文本”的道具样式键“tintColor”无效
问题描述
当我使用下面的代码时,我遇到了以下错误:
tintColor
警告:失败的道具类型:提供给的无效 props.style 键Text
<Text
style={{
tintColor: focused ? 'white' : 'black',
fontSize: 14,
fontFamily: 'SF Pro Text',
marginBottom: 15
}}
>
解决方案
tintColor
应该只适用于<Image>
组件
推荐阅读
- ios - 创建日历应用程序时如何管理我的数据?
- c - 那个条件是什么意思?
- java - BigInteger 抛出 numberFormatException
- snowflake-cloud-data-platform - 在 SnowFlake 中,我想在 sql server 中提供访问类型的 ddl_admin
- sql - 如果可能,插入临时表。通过动态查询
- javascript - 了解 JS 端的 Tokbox 视频分辨率
- android - Android Studio 3.6 总是选择第一个构建变体
- c# - 当 IXmlSerializable.ReadXml() 内部发生架构验证错误时,为什么 XmlSerializer 会引发异常并引发 ValidationEvent
- c++ - C++ 将 char 转换为 CString
- c++ - 为新的 ArrayFire 版本调整 MatchedFilter 算法时出现问题