Closed gabriel4649 closed 4 years ago
Hi!
It is possible to reach a state where the property podcast is null but podcastPending is false.
That's intended! The property pending
is only true
when you fired up a request to fetch data. When it fails or when it's successful, it will be false
again. If you didn't fetch any data at the beginning, it will also be false
. So maybe you have to check your guard if the property is null
and the according pending property is false? Hope this helps!
Alright, thanks for the clarification.
This is a very common pattern, so it might be worth mentioning it in the docs.
Hi!
Thanks for creating this amazing tool.
First I will present some reference code, then I will discuss an issue which might be a bug.
It is possible to reach a state where the property
podcast
isnull
butpodcastPending
isfalse
. Rendering is successful as thepodcast
is successfully loaded, however I'm getting errors in the console because my<div v-if="loaded"></div>
guard is not working as intended, sincepending
is set tofalse
before the data is actually loaded.I'm trying to use the
pending
property like it is shown in the docs:Is this a bug or does pending have another meaning other than the data is already loaded from the API?