React路上遇到的Bug

发表于:2018-9-25 13:25

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:Anby-PBH    来源:博客园

  在学习React的道路上,经常遇到很多的bug,而且发现它的bug很不好找到错误在哪里,尤其像下面的这些:
  但是我们可以利用这样一种方法:从控制台中找到提供的链接
  1. Error: Minified React error #109;
Error: Minified React error #109;
visit http://facebook.github.io/react/docs/error-decoder.html?invariant=109&args[]=Form for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
请在文本框输入文字
  从该链接中可以找到:错误原因:没有return返回数据
  1
  Form.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.
  2
   Uncaught TypeError: Super expression must either be null or a function, not undefined
  错误原因:就在super之前查找代码的错误,一般是拼写错误;大都是React.Component的C没有大写;
  3.TypeError: Cannot read property 'func' of undefined
  在使用react-router的时候,要注意下载的版本问题;
  import {Router,hashHistory,browserHistory,Route,IndexRoute,IndexRedirect,Redirect} from 'react-router'
  上面下载的版本要使用:
  "react": "^15.6.1",
  "react-dom": "^15.6.1",
  "react-mixin": "^4.0.0",
  "react-router": "^2.8.1",


    上文内容不用于商业目的,如涉及知识产权问题,请权利人联系博为峰小编(021-64471599-8017),我们将立即处理。

《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号