web
web copied to clipboard
chore(docs): identify that useLocalStorageValue is sync'd across tabs
What is the problem?
While reading through the migrate from react-use docs I incorrectly determined that the new useLocalStorageValue hook was not sync'd across tabs, because of this note
What changes does this PR make to fix the problem?
Explicitly identify in the useLocalStorageValue() docs that the value is kept in sync across tabs.
Checklist
- [ ] Is there an existing issue for this PR?
- link issue here
You'd better also fix the issue within migration guide https://github.com/react-hookz/web/blob/master/src/docs/migrating-from-react-use.story.mdx
Thanks for contribution
I believe synchronization been implemented after one of refactors of that hook🤔 Bu i forgot to update migration guide.
@xobotyi I thought that I had misread the migration guide.
Should this be referring to useLocalStorageValue() from this package, or useLocalStorage() from react-use?
(Presumably it is referring to useLocalStorageValue())
@develohpanda it shuld describe how it works within react-hookz version. After second read i've done it opposite way from the moment i've wrote the comment 🙃 IMO it would be better to rephraze whole note about sync
Sounds good, thanks for confirming! I'll update and push to this branch.