Skip to content

Remount when navigating to the same component but different routes #304

@melang982

Description

@melang982

I have two routes that both should display Home component:

<Route path="/tags/:id" component={Home} />
<Route path="/" component={Home} />

When user is at URL /tags/cats and clicks on a different tag, for ex. /tags/dogs, no remount happens, and that's indeed the intended behavior.
But if the user is at the homepage / and clicks on a tag and vice-versa, the component remounts. How can I avoid this remounting?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions