C
C
ckatala2019-02-24 13:34:14
React
ckatala, 2019-02-24 13:34:14

TypeError: Cannot read property 'pathname' of undefined?

I have a ready-made application on create-react-app
I’m transferring it to Razzle
now Everything would be fine, but I get an error TypeError: Cannot read property 'pathname' of undefined
client.js

hydrate(
  <Router>
    <Provider store={store}>
      <Route component={App} />
    </Provider>
  </Router>,
  document.getElementById('root')
)

server.js
<Provider store={store}>
      <StaticRouter location={req.url} context={context}>
        <App />
      </StaticRouter>
    </Provider>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question