atlassian-labs / react-resource-router

Configuration driven routing solution for React SPAs that manages route matching, data fetching and progressive rendering
https://atlassian-labs.github.io/react-resource-router
Apache License 2.0
198 stars 28 forks source link

update routeHasChanged() to check route name and group instead of object reference #125

Closed liamqma closed 2 years ago

liamqma commented 2 years ago

Update routeHasChanged() to check if both route name and group match rather than to compare them by ref.

This is to fix https://github.com/atlassian-labs/react-resource-router/issues/106,

We might have something like:

<Link to={import(/* webpackChunkName: "issue-route" */'./issue-route')} prefetch="hover"></Link>

I guess comparing object reference isn't bulletproof and the combination of route name and group should be unique.