Skip to content
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

useSessionStorage setValue type is wrong #1891

Open
cloud-walker opened this issue Mar 22, 2021 · 1 comment
Open

useSessionStorage setValue type is wrong #1891

cloud-walker opened this issue Mar 22, 2021 · 1 comment

Comments

@cloud-walker
Copy link

What is the current behavior?

): [T, (value: T) => void] => {

What is the expected behavior?

It should not return void, instead it should work like vanilla useState work (returning T I guess)

@JoeDuncko
Copy link

Hi all! @react-hookz/web, the new library by one of react-use's former maintainers (background here and here) has a new version of useSessionStorage called useSessionStorageValue whose type declarations have been built with a bit more care than react-use's.

For those interested, there's an official migration guide for migrating from react-use to @react-hookz/web.

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants