道具类型警告显示为`b`而不是组件名称

时间:2019-07-03 17:46:15

标签: reactjs react-proptypes

我一直在尝试在我的组件中实现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有某种联系,但是即使删除后,问题仍然存在。

任何帮助将不胜感激。

编辑:可变字母是由压缩代码引起的,与任何组件无关。

0 个答案:

没有答案