简体   繁体   English

错误:React.createClass 不是 function [WebDataRocks]

[英]Error : React.createClass is not a function [WebDataRocks]

I'm trying to use WebDataRocks(npm) with React(v16.14.0) and its failing with the below error "React.createClass is not a function"我正在尝试将 WebDataRocks(npm) 与 React(v16.14.0) 一起使用,但失败并出现以下错误“React.createClass 不是函数”

Does it support React(v16.14.0)?它支持 React(v16.14.0) 吗?

You are right, there was an issue with React v16.14.0.你是对的,React v16.14.0 存在问题。

The PropTypes have been moved from React to their own package prop-types , so they need to be imported separately. PropTypes 已从 React 移至其自己的 package prop-types ,因此需要单独导入它们。

The webdatarocks.react.js file got updated and now it works well with React v16.14.0. webdatarocks.react.js文件已更新,现在它可以很好地与 React v16.14.0 配合使用。 Here is a link to a WebDataRocks sample React project on GitHub for reference.这是GitHub 上的 WebDataRocks 示例 React 项目的链接以供参考。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM