reactjs - 道具类型警告显示 `b` 而不是组件名称
问题描述
我一直在尝试prop-types
在我的组件中实现更好的文档和错误处理。但是,当发出警告时,调用堆栈会包含字母来代替组件名称。
前任:
Warning: Failed prop type: The prop `type` is marked as required in `b`, but its value is `undefined`.
in b (created by b)
in b (created by withI18nextTranslation(b))
in withI18nextTranslation(b) (created by ConnectFunction)
in ConnectFunction (created by c)
in c (created by LoginLayout)
in div (created by LoginLayout)
in LoginLayout (created by c)
in c (created by b)
in Switch (created by b)
in Router (created by BrowserRouter)
in BrowserRouter (created by b)
in b
in I18nextProvider
in Provider
当然,这并不理想,因为我无法找出哪个组件存在此问题。
我的第一个想法是它与 I18next 有某种关系,但即使删除后,问题仍然存在。
任何帮助将非常感激。
编辑:可变字母是由缩小代码引起的,与任何组件无关。
解决方案
推荐阅读
- python - 获取 Instagram 帖子的点赞者列表 - Python 和 Selenium
- php - 无法回显某些 PHP 变量
- python - Python中逆对角线上的滚动平均值
- java - 通过 Jaydebeapi Connection 找不到 Impala 驱动程序类
- angular - 访问嵌套的 formGroupControl,Angular-6
- angular - Observable 在模板中具有 observable 成员
- javascript - 应用css时查看顶部文字:“overflow:hidden;”
- python - Tensorflow Keras 也使用 tfrecords 进行验证
- swift - 将字符串拆分为数组,在 Swift 中保留分隔符/分隔符
- outlook - “新建”Outlook Online 关闭任务窗格加载项