use-dark-mode
use-dark-mode copied to clipboard
Types: Allow passing lazy initial state getter
This argument is passed to useState and therefore can accept a lazy initial state getter. I've had to @ts-ignore some usage of the hook so that I can pass a function here.
See https://github.com/NorfolkDev/norfolkdevelopers-website/blob/39c988376c38976f9eaa2dfac3638c6fd938ec14/src/components/DarkModeToggle.tsx#L7-L10
@donavon Could you take a look at this please?
@donavon Just a gentle ping, could you review this please?