preact-router icon indicating copy to clipboard operation
preact-router copied to clipboard

updating url prop doesn't trigger an update

Open halcaponey opened this issue 5 years ago • 0 comments

version : 3.0.1

<Router url={props.url}>
  // ...
</Router>

In the code above if props.url is updated Router doesn't rerender. Looking at the code it comes from the fact that state.url is used in the render method and that it's never updated with props.url

I can PR if you want.

halcaponey avatar Aug 09 '19 22:08 halcaponey