use-dark-mode
use-dark-mode copied to clipboard
Fixed storageProvider typings
According to the code, you pass storageProvider
to the use-persisted-state
, and it uses getItem
directly from it, not from localStorage
property:
https://github.com/donavon/use-persisted-state/blob/develop/src/createStorage.js#L3