React.render is not a function
来源:互联网 发布:笔记本电脑护眼软件 编辑:程序博客网 时间:2024/05/06 07:33
在用React 15.*版本的时候,浏览器报了这个错误
React.render is not a function
我当时就懵逼了,看了配置什么的都时没有问题的,怎么会报这个错误。然后去查了React最新的Api
结果发现 React 0.14版本之后将react package拆分成了 react 和 react-dom 两个package
而我的写法是这样的
React.render( <Hello />, document.getElementById("app") )
因为没有引入 react-dom包所以导致报错了。
随后 npm i react-dom --save
引入 var ReactDOM = require('react-dom');
改成写
ReactDOM.render( <Hello />, document.getElementById("app") )
问题得到解决。
3 0
- React.render is not a function
- react入门,控制台报“React.render is not a function”错误
- laydate.render is not a function
- upload.render is not a function
- WebStorm中运行React15.3.1控制台报“React.render is not a function”错误
- react:undefined is not a function(this.State({flag:true,}))
- React Ajax this.IsMounted() is not a function
- React中报this.isMounted is not a function
- dva -react TypeError: root.findRouters(...).getRouterInfo is not a function
- Lay ui 的时间插件 总是报错 Uncaught TypeError: laydate.render is not a function
- $ is not a function
- $ is not a function
- is not a function
- 解决vux 引入组件时Error in render function: "TypeError: _vm.$t is not a function"问题
- $(...).niceScroll is not a function; $... is not a function
- object is not a function
- RVM is not a function
- $(...).scrollpic is not a function
- linux网络编程常用头文件总结
- ASP.NET MVC 4中如何为不同的浏览器自适应布局和视图
- hadoop下实现kmeans算法——一个mapreduce的实现方法
- JavaScript Cookie的使用实例
- QXlsx读写excel
- React.render is not a function
- MySQL 自学笔记之:数据库查询 DQL(Data Query Lanuage)数据分类(where 子语句)
- 项目适配iOS9遇到的一些问题及解决办法
- 图的理解:深度优先和广度优先遍历
- 如何将UUID保存在钥匙串(keyChain中)
- JavaScript onmousewheel鼠标滚轮示例
- 用Hadoop1.0.3实现KMeans算法
- Maven的作用
- Logistic回归---从疝气病症预测马的死亡率