Page doesn't re-render when URL parameter changes
See original GitHub issueHow to reproduce:
- configure a route with a parameter, e.g.
item/:itemId
- navigate to a valid route, e.g.
item/7
- change the
itemId
parameter value, e.g.item/8
, in the browser address bar and hit enter
Expected result:
- browser should fire a
hashchange
event - router should replace the page content for item 7 with the content of item 8
Actual result:
- browser fires a
hashchange
event ✔️ - router doesn’t replace the page content (still showing item 7) ❌
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Why React-router doesn't re-render the page ... - Stack Overflow
If Details component is linking to itself, i.e. the route rendering it, this means the route path is already matched and rendering Details...
Read more >Component not re-rendered when changing url param #27
Try passing the route parameter id as a prop ; If you need your component to be fully unmounted and remounted, you can...
Read more >Page is not re-rendering after URL parameter changed - Telerik
Hi, I'm using "nav-link" to go to page: @page "/orders" I'm also using Parameter which tells me what type of order to be...
Read more >How to rerender components when vue router params ...
In this lesson, we learn how to re-render components when Vue Router params of the same route changes. We learn about the special...
Read more >(Router) URL changes but the page does not re-render : r/reactjs
I am new to react and react-router, so please go easy on me. I am trying to implement router in my Todo List...
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
Thanks for pointing me in the right direction. Took me a while still to get it working but I got there. For others that end up here, who maybe are as new at svelte as I am, this is what i did to get it working:
then in the script i put this line:
this is the fetch function:
the format of the url for my app is:
@crazedVic Thank you!
Easy example: