Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I found a fix to the clock not updating without the refresh I would like to contribute the code to help but wanted to get the ok with you first! #12

Open
HadyM opened this issue Jun 3, 2021 · 0 comments

Comments

@HadyM
Copy link

HadyM commented Jun 3, 2021

Originally you had useEffect(() => { setTime(new Date()) }, [new Date().getMinutes()])

The fix I tried on my own project is useEffect(() => { const interval = setInterval(() => { setTime(new Date()); }, 1000); return () => clearInterval(interval); }, []);

Please let me know if I can contribute this piece of code I'm new to GitHub and I'm trying to build my profile contributes thank you and have a great day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant