r/learnreactjs • • Apr 08 '24

Add delay to react reload

Hi!

I couldn't find an appropriate answer on google or chatGPT, my question is :
Everytime I type any code in .js or .css files, for every character, React reloads its page.
It's good, but it's hurting my eyes because it does it way too often. Is there a way to add a delay of like 0.5 sec or more ?

My react app runs in docker but has volume binding and doesn't run on any server.

I've also been coding frontend for multiple days straight so maybe my eyes just need to take a break.

1 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/Fardir Apr 09 '24

Adding a delay to vscode's autosave was the perfect solution, I kinda feel dumb now...
Thank you sir.