donavon / use-dark-mode

A custom React Hook to help you implement a "dark mode" component.
MIT License
1.28k stars 100 forks source link

Fixed storageProvider typings #62

Open vitalybaev opened 3 years ago

vitalybaev commented 3 years ago

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