-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: new hooks useLocalStorageValue
and useSessionStorageValue
#43
Conversation
Codecov Report
@@ Coverage Diff @@
## master #43 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 20 23 +3
Lines 163 282 +119
Branches 22 55 +33
==========================================
+ Hits 163 282 +119
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a lot of code to code review, so I may have missed something, but it looks good besides a few typos.
Question: Does this implementation sync multiple instances of useLocalStorageValue
that use the same key? I know that was a common "problem" people had with react-use's implementation.
Not yet but it will, as for now it syncs between tabs. I'll try to manage in-tab sync don't know how yet. |
Should we make an issue for that? |
No need, unless will merge this implementation |
Ah, didn't realize this was still in progress |
useStorageValue
, useLocalStorageValue
useStorageValue
, useLocalStorageValue
and useSessionStorageValue
useStorageValue
, useLocalStorageValue
and useSessionStorageValue
useLocalStorageValue
and useSessionStorageValue
@JoeDuncko finally finished! it was a tough one. |
# [1.19.0](v1.18.0...v1.19.0) (2021-05-16) ### Features * new hooks `useLocalStorageValue` and `useSessionStorageValue` ([#43](#43)) ([f02e8ea](f02e8ea))
🎉 This PR is included in version 1.19.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What new hook does?
Add new hooks to manage
localStorage
andsessionStorage
keysChecklist
react-use
#33