Code Monkey home page Code Monkey logo

Comments (6)

wmertens avatar wmertens commented on May 18, 2024 3

Let's wait until v2 alpha is out to check if the bug still exists there. In the mean time it would be very helpful to create the repro in https://qwik.dev/playground so that it's easy to test with the alpha

from qwik.

tuurbo avatar tuurbo commented on May 18, 2024 1

I wanted to take another look and try a few things. It seems the use of await inside useTask is causing the bug. I created an example repo with 3 example components. The only difference between each component is the code within the useTask.
https://stackblitz.com/github/tuurbo/qwik-task-bug?file=src%2Froutes%2Findex.tsx

from qwik.

tuurbo avatar tuurbo commented on May 18, 2024

Looks like there's an issue with the useVisibleTask example too. The page count doesn't increase past 2.

from qwik.

notcod avatar notcod commented on May 18, 2024

Looks like there's an issue with the useVisibleTask example too. The page count doesn't increase past 2.

I didn't saw it at first, but you are right, maybe that's also a bug?
I have edited the code

    {!loading.value && (
      <input
        type="submit"
        value="Button that works only one time with useVisibleTask$, but always with useTask$, why?"
        onClick$={increase}
      />
    )}
    <input
      type="submit"
      onClick$={increase}
      style={`${loading.value && 'background:red;'}`}
    />

from qwik.

fabian-hiller avatar fabian-hiller commented on May 18, 2024

I think I encounter a similar bug in the QwikCityProvider in line 504. The update call routeLocation.isNavigating = false; is triggered, but useTask$ is not always notified. It works with useVisibleTask$ for me.

from qwik.

tuurbo avatar tuurbo commented on May 18, 2024

Here is a slimmed down example

https://qwik.dev/playground/#f=7ZdNb9NAEIb%2Fymg5JLSJkyJFRUkDEtATEpUoiCNyHCexcGzLdmhQlP%2FOO7OzaycupVckfGjj9e7szOx8PNsOmtfXk8eiZuB7rvySujagJ4PJS0mqd2X%2BwA1PZ5vOscq7eWYAKjEIUcy9XtaL%2FJ0fxocpXQ30NUWe4zSntArTKrajR%2FvPrUAmIUJ%2BYhVXa51iXeT3TDJOOBTaObUVIqtMwJteXs4wwpnQaBrXXGeYfGSdV2aRg0zCrCNHJ2C2%2FuqIRBV9H6LWszxbV9vaaFy1GmC%2FX8r3pnn3ywFdjcfjlxDrhXsSUpkHpZtjS7iMqPGN2XY9UbKivj9vm1f8jC7koQ93t%2FefvtC3u88fyQ5djHSKbdpqWF%2B0Eo945%2FXl7NxGRGeiWeb9uVBghpcYcNM9OTX5%2FugW%2Fis7xkWCOukPWQsyVm40Rbi0Bzwp9jP6vkJ5Hj7EyXpT85mnyxnJUIUegRi9xiTTpOztvhComgI6uIda0iagExjjxhLxmy2SI0ErvhnpgHBFRXVuY1T4RRDaAlhALgIrMCAgJtqEGb7a5M3yHq%2Fs%2FYqrHi13wuir8AewCc06gvMCX0CY%2F%2F9q8Ra4lWTDRQ7Nt7BwzINPmPy14h17EgE9GFChuflYxPEwqkC%2FBRgKfBDt0qJM6oCU00Yo7UpsUY6FzGGgE78eKyGCMV78CjEb9O%2B8fL5Rr8QAcHMB2EENSWO2B3%2BHy6S0wIYrUJ7uttmM1mHhTAYFrLOhoJZdNcTNp6xnCIIS1Q%2BCiz0B7JIlvYiiyDlOl7ccJNcvW9IOTc4dTzTXWb646ERXS96SwfEampLJctNZaqPMvyPN0ZTnxg6b1ri7PcxP5XN%2BuMffhQ6nydZJaC60Ptns4ypsUwAk%2B9ri9XJ2KjXalVUOjxoB47g0rvKrSkUYJTXO7twp42ACl%2Fg%2BIZuBVPla1OzZ%2BIk0HRvHuZtwN5iaDvsfi%2F5JLPoN

from qwik.

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.