documentation
documentation copied to clipboard
[Docs] Save user theme preference
Is your feature request related to a problem? Please describe.
I use the docs of react-hook-form quite often and I always have to switch the theme back to light mode.
Describe the solution you'd like I would love if the website remembered my previous selection.
Describe alternatives you've considered Manually doing it each time 😢
Additional context
Are you referring to the same docs as this? If yes, the website remembers my theme selection.
Are you referring to the same docs as this? If yes, the website remembers my theme selection.
Yes that site, once I close the tab and go back it always defaults to dark for me 🤷🏻♂️
.@michaeloliverx @griimick
Documentation site is using "little-state-machine" with default option to persist data to session storage therefore the dark/light mode is only available on each tab.
@bluebill1049
Can we add "storageType" option with value local storage when creating store ?
Referrer: https://github.com/beekai-oss/little-state-machine#-createstore
File to be updated: https://github.com/react-hook-form/documentation/blob/master/with-little-state-machine.js
Makes sense. I would suggest using local storage as well.
Documentation site is using "little-state-machine" with default option to persist data to session storage therefore the dark/light mode is only available on each tab.
Yea sure, PR welcome on this 👍