Replies: 2 comments 1 reply
-
I have the exact same problem. |
Beta Was this translation helpful? Give feedback.
-
I'd look to see how you are accessing the params. The params object is a proxy of sorts so.. doing |
Beta Was this translation helpful? Give feedback.
-
Currently im working on a page and i have the following problem:
i have a route as the following "/products/1/detail"
i have an objects array that simulates a database and when i render the page, i go throw the objects array and i get the object that has the same id that it is in the route parameter.
That works fine. but the thing is that in the same page i have a section where i show lets say other products that the user can see, and when the user clicks on one of those products he will be redirect to the detail of that product, by doing that the parameter in the url will change. for example:
from "/products/1/detail" to "/products/2/detail", the thing is that when i do that the url will change but the data in the page will not be updated.
is there a way to re-render de page when the url parameters change?
i asume that i could have the same problem if instead of searching inside an object i fetch data from an API depending on the route parameter.
I apologize for my bad English, but I am not a native speaker.
Beta Was this translation helpful? Give feedback.
All reactions