Data Fetching: Pending and Re-Fetch

Explore pending and re-fetch data handling techniques.

Handling the data using the watch method is convenient to avoid blocking navigation. The template will render the contents before the data fetching is completed. But what do we do while we are waiting for the data to return?

Pending

When the request is made, and we are awaiting the data to be returned, the request is pending. This will remain until we get the requested data or an error occurs. We can access the pending state as a return value with useLazyFetch:

Get hands-on with 1200+ tech skills courses.