Async method calls in v-for
RezaErfani67 opened this issue · 1 comments
RezaErfani67 commented
can i call async method in v-for?
mokkabonna commented
You can call it, but it will only behave as if for one call per component. So you won't get the loading parameters etc for each state, if you plan to call it with different arguments. So iteration 1 of the v-for will call it, then the second will call it and reset the state and it will now represent the 2nd state only, the first is gone.
If you want to have it for each, I suggest creating a custom component that has this async method and call it from within there. Then you get way I assume you want.