On my web page, I pull items from an API and display them. The API request is made in the created
hook. I need to display a [loading] message while waiting for the API response, and a [no items] message if the loading is complete but there are no items available.
Right now, I have a computed property called IsEmpty
:
isEmpty() {
return this.cards.length == 0;
}
However, this property is triggered in both scenarios. How can I create a new property to handle both situations effectively?