Page doesn't update when navigating within the same route using different params
See original GitHub issueIf I have a route such as: 'blog/:id: Blog'
and I navigate to blog/3, via a link/href from blog/2, the route doesn’t update. I have tried using traditional links as well as the imperative push
and replace
functions provided by this library.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
angular - data is not updating on page after routing to same url ...
In this way when you navigate to a new url, the code is execute again ... in that case just try to implement...
Read more >Cannot navigate to same route with different params #2882
In react-navigation 3+ you should use navigation.push to navigate to the same route with different params, essentially forcing a 'rerender'.
Read more >Navigate to a URL with Query Strings (Search Params) in ...
React Router has a useSearchParams hook to help us read or update the query string of a route that's active, but it doesn't...
Read more >Angular: Refetch data on same URL navigation - Medium
URL params may be confusing when copied and send to another person. Value of refresh property does not match with the time we...
Read more >Router tutorial: tour of heroes - Angular
The Crisis Detail appears in a child component on the same page, ... you can detect when the route parameters change from within...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
To solve this you can force re-render the component inside of a parent component when the params change.
Try replacing your a tag with button and use the push method. Worked for me! (even with animation)