gpt4 book ai didi

reactjs - `TreeView` 、 `ObjectInspector` 、 `ConnectedTreeNode` 、 `ObjectRootLabel` 、 `ObjectPreview` 不直接支持 PropTypes 验证器

转载 作者:行者123 更新时间:2023-12-03 13:40:08 25 4
gpt4 key购买 nike

我收到这些组件 TreeViewObjectInspectorConnectedTreeNodePropTypes 验证器直接不受支持 警告>、ObjectRootLabelObjectPreview,但我不知道这些组件属于哪个库。

如何消除这些警告?

Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Check the render method of `TreeView`.
Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Check the render method of `ObjectInspector`.
Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Check the render method of `ConnectedTreeNode`.
Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Check the render method of `ObjectRootLabel`.
Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Check the render method of `ObjectPreview`.

最佳答案

即使我遇到了同样的问题,但 react 和 Prop 类型包都是最新的。

我写过

visibility: PropTypes.bool()

而不是

visibility: PropTypes.bool

我使用 PropTypes 类型作为函数,因此它抛出了错误。

关于reactjs - `TreeView` 、 `ObjectInspector` 、 `ConnectedTreeNode` 、 `ObjectRootLabel` 、 `ObjectPreview` 不直接支持 PropTypes 验证器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44511104/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com