Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

229
Views
Fetch hook and NuxtLoading component

I have a question about migration from asyncData pattern to fecth in Nuxt App. It seems straightforward, except for 1 thing - i can't get NuxtLoading component to act right. I've tried to watch for $fetchState and start loading with this.$nuxt.$loading.start(), but it's no use. The loading indicator flashes for mere second and disappears without any input on my part. Is there a trick to make it work like it does with asyncData?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The whole point of using fetch() is to not block the render in between pages. The loader is here to let the user know when he will be able to expect the next page.

When you're using fetch(), you can use $fetchState.pending to make a conditional and display either a loader or a skeleton like this: https://buefy.org/documentation/skeleton/

The loading bar should still be triggered but it will probably be smoother (and maybe shorter visually), I'd recommend to let it live it's life.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!