Electron & React

So I have been using…

Login

Blog History

So I have been using timer apps from the App Store on my Mac to time parts that I run on Zoom.

I was using Tempus but the form factor meant that I was clicking start and then having to relocate the window and hiding the control buttons. I also found that sometimes I would forget to start the timer and then a minute or two later start it and from that moment on I was doing math in my head to try and keep the actual elapsed time in mind

So with the help of Stackoverflow, Electron and React I have created my own small form factor timer with a field to change the start time which is then added to the currently running timer.

The beauty of the electron / react combo is that you can compile and run it on Linux/Mac & Windows from the same code base code here => https://github.com/toggenation/wt-timer

References:

Timer class that uses system time to keep accurate time and setTimeout loop to refresh the time every 100ms https://stackoverflow.com/a/57981688/9230077

Documentation for Electron https://www.electronjs.org/ incidentally VSCode is based on the Electron framework.

How to install React using create-react-app https://reactjs.org/docs/create-a-new-react-app.html

I was suprised how easy it was to get Electron running and built on all Win/Lin/Mac using the instructions here:

https://mmazzarolo.com/blog/2021-08-12-building-an-electron-application-using-create-react-app/

Tempus Timer on Mac Works Well

This was a good timer but was taking up too much vertical screen realestate.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.