当前位置: 首页 > 知识库问答 >
问题:

警告:失败的道具类型:为“PadView”提供的道具“组件”无效`

司英飙
2023-03-14

警告:失败的prop类型:提供给PadView的propComponent无效。

嗨,我是新来的react native,红色消息一直显示,但一切看起来都很好,应用程序呈现正确,但红色消息一直显示在终端上,你们知道这不是什么意思吗,谢谢你们的帮助。

Warning: Failed prop type: Invalid prop `Component` supplied to `PadView`.
- node_modules\react-native\Libraries\YellowBox\YellowBox.js:63:8 in console.error
- node_modules\expo\build\environment\muteWarnings.fx.js:27:24 in error
- node_modules\prop-types\checkPropTypes.js:20:20 in printWarning
- node_modules\prop-types\checkPropTypes.js:83:12 in checkPropTypes
- node_modules\react\cjs\react.development.js:1796:19 in validatePropTypes
- node_modules\react\cjs\react.development.js:1969:22 in createElementWithValidation
- node_modules\react-native-elements\src\list\ListItem.js:101:4 in ListItem
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:10696:27 in renderWithHooks
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:13481:6 in mountIndeterminateComponent
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:20459:25 in beginWork$$1
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:19370:24 in performUnitOfWork
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:19347:39 in workLoopSync
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:18997:22 in renderRoot
* [native code]:null in renderRoot
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:18709:28 in runRootCallback
* [native code]:null in runRootCallback
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:5642:32 in runWithPriority$argument_1
- node_modules\scheduler\cjs\scheduler.development.js:643:23 in unstable_runWithPriority
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:5638:22 in flushSyncCallbackQueueImpl
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:5627:28 in flushSyncCallbackQueue
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:18556:30 in scheduleUpdateOnFiber
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:21822:15 in scheduleRootUpdate
- node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:23042:20 in ReactNativeRenderer.render
- node_modules\react-native\Libraries\ReactNative\renderApplication.js:52:52 in renderApplication
- node_modules\react-native\Libraries\ReactNative\AppRegistry.js:116:10 in runnables.appKey.run
- node_modules\react-native\Libraries\ReactNative\AppRegistry.js:197:26 in runApplication
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:436:47 in __callFunction
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:111:26 in __guard$argument_0
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:384:10 in __guard
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:110:17 in __guard$argument_0
* [native code]:null in callFunctionReturnFlushedQueue

共有1个答案

怀飞掣
2023-03-14

更新反应本机元素。这个问题在版本1.2.2中得到了解决(我认为是由于0.61.1中propTypes处理的一些变化引起的)。

 类似资料: