Answer the question
In order to leave comments, you need to log in
How to re-fetch data within a Vue component?
Hello
The essence of the problem is that there is a component along the /user/1 route.
When created, it draws data from the store
. But it is possible to go from user/1 to user/2.
But then, this component is created and it is not possible to redraw the data, because created mounted works only in 1 once.
On the computer, they solved the problem of doing watch for changing the route, and rendering by parameter.
But the problem is that on the phone when you press the back button, the route changes but the component does not change.
Watch for some reason does not catch changes.
How can this problem be solved?
Answer the question
In order to leave comments, you need to log in
https://router.vuejs.org/ru/guide/advanced/navigat...
might solve your problem
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question