Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

react-Countdown Timer (minor out of sync) problem after refreshing the screen [closed]

$
0
0

I have an auction site in MERN stack with socket.io and i seem to have this unsolvable problem which i think is related to browsers and basic JS

Flow:

  • whenever a product is added by admin, socket broadcasts it with allof details (including time )to all clients.

  • the clients can bid on them and stuff.

  • if a user refreshes the screen , it requests the socket for latest product time and starts countdown from that time.

Everything is fine except some times react-countdown is lagging 0.5 second to 1 second behind whenever page is refreshed (please note that problem does not occur when opening same auction on new tab)

Note: i have also tried self made Countdown timer using setInterval but the problem does not go away

I am seeking assistance with this problem and am willing to compensate someone for their time and efforts to work with me directly to resolve it. Any help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>