RubyLouvre / anu

the React16-compat library with hooks

Home Page:https://rubylouvre.github.io/anu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

anu自带router的ssr下执行会报错

gaterking opened this issue · comments

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>;
    }

有没有相关例子可以参考下?

Router和Link两个组件的不支持SSR,需要判断location.getPath是否存在

已经合并了