davidmfoley / react-router-modal

Simple modals for react-router 4
MIT License
153 stars 20 forks source link

Match object always has path & url '/' #49

Closed squidsoup closed 5 years ago

squidsoup commented 5 years ago

With:

<ModalRoute component={Bar} exact path="/bar" parentPath="/foo" />

when I log match from the Bar component, it looks like:

{
  isExact: false
  params: {}
  path: "/"
  url: "/"
}

Rerendering the ModalRoute with the same props, but as a <Route> I get:

{
  isExact: true
  params: {}
  path: "/bar"
  url: "/bar"
}

versions

react@16.8.6 connected-react-router@6.4.0 (Not using BrowserRouter) react-router-dom@5.0.1

squidsoup commented 5 years ago

Apologies, looks like this was a webpack configuration issue.