anu自带router的ssr下执行会报错
gaterking opened this issue · comments
gaterking commented
TypeError: location.getPath is not a function
at eval (webpack:///./node_modules/anujs/dist/Router.js?:673:48)
at Object.eval [as children] (webpack:///./node_modules/anujs/dist/Router.js?:379:32)
render(){
return <ServerLocation url={this.props.req.url}>
<Router>
</Router>
</ServerLocation>;
}
有没有相关例子可以参考下?
gaterking commented
Router和Link两个组件的不支持SSR,需要判断location.getPath是否存在
司徒正美 commented
已经合并了