reactjs - 如何使用 React Native PropTypes 和 ESLint 为 Text 正确键入样式道具
问题描述
我正在尝试按照该答案styles: Text.propTypes.style
中的建议使用。
但是 ESlint 抱怨:
ESLint: Using `propTypes` from another component is not safe because they may be removed in production builds (react/forbid-foreign-prop-types)
解决这个问题的正确方法是什么?
解决方案
推荐阅读
- r - R对列表中具有不同维度的矩阵求和并返回一个矩阵
- google-app-engine - 如果自动扩缩功能无法创建新实例,App Engine 请求会发生什么情况?
- visual-studio-2019 - Nuget 提示凭据
- lua - 有没有办法让 lua 脚本不那么滞后?
- c++ - 我在循环函数时遇到问题
- python - 街机 python 库的字体名称是什么?
- ios - 在项目和共享扩展之间共享数据
- c# - 在 C# 中,当我想将它从我的控制器移动到存储库文件时,我应该如何更改方法语法?
- c# - 如何编码为 png 网络摄像头纹理?
- c++ - 创建指向对象的指针时调用对象的不相关方法