[Vuejs]-Slight delay in vue js computed property

0👍

✅

The component is created and made ready before the callback in next() is called. If it was not, then vm.testData = response.data wouldn’t have any effect. Therefore, paginatedData is first called whilethis.testData === null || undefined || whatever, then, when testData is updated in the next() callback, it is called again.

You can use a simple check like if (!this.testData) return null in paginatedData to circumvent.

This thread detailes the issue.

Leave a comment