Thank Ghazi! You inspired me.
I don't know what might go wrong, but I perform a localStorage update in the useEffect cleanup function and, as for now, it works flawlessly!
EDIT:
When I reload a page (electron), react doesn't call the cleanup function.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank Ghazi! You inspired me.
I don't know what might go wrong, but I perform a localStorage update in the useEffect cleanup function and, as for now, it works flawlessly!
EDIT:
When I reload a page (electron), react doesn't call the cleanup function.