GithubHelp home page GithubHelp logo

Delay in redrawing dom about karax HOT 6 CLOSED

C-NERD avatar C-NERD commented on June 21, 2024
Delay in redrawing dom

from karax.

Comments (6)

geotre avatar geotre commented on June 21, 2024 1

Your fetchWithTimeOut code needs to call Karax's redraw proc after the request has returned. You can see how it is done in Karax's own request procs.

This is not a bug, this is just how Karax implements reactivity (by redrawing on events)

from karax.

geotre avatar geotre commented on June 21, 2024

Can you share a minimal reproducible example?

from karax.

C-NERD avatar C-NERD commented on June 21, 2024

Can you share a minimal reproducible example?

I just created a minimal example and the example works fine. So I tried debugging my code and I found out that the delay only occurs when I try to call setToast after making a request. I don't think I will be able to created a minimal reproducible example that will replicate the delay but I can send the file. It's about 300 lines of code. Should I send the file 😁

from karax.

geotre avatar geotre commented on June 21, 2024

Yeah share it. Are you using the request procs from karax or something else? Depending on how your request code works you may just need to call redraw once the request returns

from karax.

C-NERD avatar C-NERD commented on June 21, 2024

Sorry for the late reply. Here is a link to a google drive folder containing the files https://drive.google.com/drive/folders/1ELUzC0cGzfEmDqHI21vquvrWkogMizJH?usp=sharing the files include utils.nim which implements most of the code, homepage.nim the file which imports from utils.nim to make the home page and views.tmpl which contains code that the application uses for calling apis. The setToast code is inside utils.nim

from karax.

C-NERD avatar C-NERD commented on June 21, 2024

Thanks 👍 that worked, but I didn't add redraw in the fetchWithTimeOut function but inside the setToast proc (adding that detail just Incase anybody else is reading this)

from karax.

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.