[Vuejs]-Why does async inside computed make infinity loops (vue)?

0👍

Computed should not use async. If you want to do that, you need another library for it. https://alligator.io/vuejs/async-computed-properties/

But what you want to do is use an asynchronous method (in the component or store) and set the data somewhere (in the component’s data or store’s state), then have your computed value reference that.

Leave a comment