Skip to main content
0 votes
1 answer
120 views

I am polling a server, using setInterval, until the pdf's that I want to download are ready...Once the pdfs are ready to download, I clear the interval, and then I call a function async function ...
Chris's user avatar
  • 3,181
2 votes
3 answers
104 views

I've been writing a userscript for a site and I want to show an update notification while the user is tabbed off of the site, and I came up with an idea to use the site title for that. This is my ...
ccjt's user avatar
  • 35
1 vote
1 answer
46 views

var [testVar,setTestVar]=useState(0) var showTestVar=()=>{ console.log(testVar) } var effectTest=()=>{ setTestVar(1) setInterval(showTestVar,1000) } I want to have a ...
Gene Knight's user avatar
0 votes
0 answers
36 views

I am creating a tizen web app where I am checking the internet connection and the do a fetch request to check that the internet is working. but the issue is that it randomly tells me that no internet ...
Muhammad Aamir Khan's user avatar
3 votes
1 answer
66 views

In a video I saw creating a progress bar and updated its value using state and wrapped it inside setInterval for updating it every 15 millisecond and the whole being wrapped inside useEffect, with no ...
ABISHEK NS's user avatar
0 votes
0 answers
60 views

I need to run a function every fixed time with maximum precision. For example, every 30 milliseconds a function will run. I tried this code: this.interval = setInterval(() => { this.foo(...
Avraham's user avatar
  • 63
1 vote
1 answer
41 views

I couldn't really understand what is causing change detection to run in the below code. I understand that markForCheck doesn't do it but something must do it because the view is updated if you play it ...
Luke's user avatar
  • 11
2 votes
1 answer
64 views

How to make a high-resolution setInterval in Node with It's possible in browser with just setInterval I want to make an real-time application for working with serial on 250Hz speed For this I need to ...
Dimava's user avatar
  • 11.1k
1 vote
0 answers
74 views

This is really a head scratcher... I'm running Node 22.9.0 on a raspberry PI (Linux raspberrypi 6.1.21-v8+) My script, which is run as root, can write a new file in the current directory and update ...
Roy Kolak's user avatar
  • 635
2 votes
3 answers
78 views

Recently I am reading article related to useInterval, these code works fine: import React, { useState, useEffect, useRef } from "react"; import ReactDOM from "react-dom"; function ...
Kelsey Zhou's user avatar
5 votes
4 answers
166 views

I have a useTypewriter hook that seems to skip the second iteration since the i never logs as 1. Why is the code not working? The output should be howdy, not hwdy. Here is the full code: const { ...
user8758206's user avatar
  • 2,245
0 votes
1 answer
51 views

If I initialize setInterval inside of a loop within a function, clearInterval doesn't work. I tried setting it to the name of the variable and then the function itself. There are plenty of questions ...
Realto619's user avatar
  • 115
2 votes
0 answers
38 views

I'm trying to scroll text up the screen in about 4min +/- a few seconds doesn't even matter, along with a 4min audio. To follow it, I've muted the audio 1 second every 10 seconds. I display the ...
user3055937's user avatar
-4 votes
3 answers
68 views

I want to make a slide show with JS using the setInterval function, but I don't know why my code is not working? While there is no error in console, I have a number of pictures that start with the ...
youssef kroma's user avatar
2 votes
3 answers
57 views

Consider this code: const [seconds, setSeconds] = useState<number>(START_VALUE); useEffect(() => { const intervalId = setInterval(() => { setSeconds((previousSeconds) => ...
mehran's user avatar
  • 1,494

15 30 50 per page
1
2 3 4 5
317