Answer the question
In order to leave comments, you need to log in
How to update the data on the page when the state changes?
There is an API
that pulls data from it, which I get by a conditional ID that is passed to the component from the URL, routing to react-router
is a parent component, in fact, data is pulled into it
in the parent component, there is a child that is loaded only after the data is loaded into the parent, so how to transfer data to the child, in fact, in the child there is also a request to the API
when the parent component is loaded for the first time, everything is fine, but when you click on an element in the child component, the URL changes and the data is not reloaded. for some reason the component is not re-rendered.
So the question is, why is this happening and what to do in this situation?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question