Git Product home page Git Product logo

Comments (8)

dohomi avatar dohomi commented on July 18, 2024 1

@Atinux sure you can add me as maintainer, I will try my best.

I'm using a global indicator now and it works quite good so far. Will close it for now, maybe if I find a smarter solution I'll re-post it here

from apollo.

IgorSzymanski avatar IgorSzymanski commented on July 18, 2024 1

Is there any out-of-the-box solution yet or is a custom implementation the only solution?

from apollo.

arteagabriel avatar arteagabriel commented on July 18, 2024 1

@IgorSzymanski Not sure if you got it figured out but I was able to get it working with this

watchLoading: function(isLoading) {
    this.$nextTick(() => {
        if (this.$nuxt && this.$nuxt.$loading) {
            isLoading ? this.$nuxt.$loading.start() : this.$nuxt.$loading.finish();
        }
    })
}

from apollo.

Atinux avatar Atinux commented on July 18, 2024

Hi @dohomi

Does this code works when you implemented it?

from apollo.

dohomi avatar dohomi commented on July 18, 2024

@Atinux no it does not work. The problem is, that the routing already calls start() and finish() before the watchLoading hook is being called. And somehow (I don't know the reason) the call of

 watchLoading(isLoading){
          if (isLoading) {
            this.$root.$loading.start()
          } else {
            this.$root.$loading.finish()
          }
   } 

Is not showing the global loading at all.

from apollo.

Atinux avatar Atinux commented on July 18, 2024

I see @dohomi

Why not disabling loading into your nuxt.js app and use a custom loader that you can start/end with events instead?

BTW, you are contributing well on this module and honestly, I don't use apollo, do you want to be a maintainer of this module?

Please mention me, I have too many Github notifications so it's hard to keep track of them :/

from apollo.

Atinux avatar Atinux commented on July 18, 2024

@dohomi Welcome to Nuxt Community :D

from apollo.

dohomi avatar dohomi commented on July 18, 2024

@Atinux OK thanks!

from apollo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.