Answer the question
In order to leave comments, you need to log in
How to wait for props values to load?
Good day. The value of props is pulled from the api, but how in the child can you see that the props have loaded? I was sure that watch would work, but this did not happen.
watch: {
chartData(){
this.t.update();
}
}
Answer the question
In order to leave comments, you need to log in
In such cases, it's good to make a loader. And while the data is being loaded, we show the loader, and when they arrive, we show the components into which we forward the data received, filtered or processed for other tasks (for example).
Data loading should be tracked where this loading is initialized. But in any case, if the value of the prop changes, the component should re-render.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question