Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
melang982 opened this issue Aug 16, 2024 · 0 comments
Open

Comments

@melang982
Copy link

melang982 commented Aug 16, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant