[英]React-router : render is not a function
I am new to react.js. 我是React.js的新手。 I upgraded react-router from v0.13
to v1.0.2
. 我将react-router从v0.13
升级到v1.0.2
。
According to the changelog , I replaced 根据变更日志 ,我更换了
Router.run(routes, function(Root){
React.render(<Root/>, document.getElementById('app'));
});
with 同
render(<Router routes={routes}/>, document.getElementById('app'));
I get an error saying render is not a function. 我收到一个错误消息,指出render不是函数。
What am I missing here? 我在这里想念什么?
An import: 进口:
import { render } from 'react-dom'
Then you should be good. 那你应该很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.