react-ui
react-ui copied to clipboard
Persist theme in localstrorage
After choosing a theme other than the default theme which is 'light'
. If I refresh the page, the page theme is being reset to 'light'
. This is because, on reload it is calling useState('light')
again.
Is it even an issue?
It would be nice if it kept the configuration that the user chose.
Go for it!
Yes, We can store the current theme in local-storage (when a user visits the website it will be set tolight
by default) and we can update it as per the user convenience.
Thus, When a user visits the site theme will be set as per the user's selected theme (by default it will be set to light
).
I would like to work on it, unless some else took it up. Let me know :)
@jsrikrishna11 Go for it :)