-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
useLocalStorage shouldn't include "| undefined" in its type if an initial value is provided #1483
Comments
Hi: I am here as part of HacktoberFest. Can I fix this issue |
I think there should be no |
@JoshuaKGoldberg I fixed this issue in August, but still waiting for my PR #1438 to be accepted. 😕 @kamilmielnik I also considered letting |
Hi all! @react-hookz/web, the new library by one of For those interested, there's an official migration guide for migrating from react-use to @react-hookz/web. Hope this helps! |
Closing out my old issues I no longer have context on. If anybody else is still seeing this, I'd encourage you to file a new issue with more information. Cheers! |
What is the current behavior?
value
is now typeValue | undefined
, even though we know there's a correctinitialValue
provided.Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than
react-use
. Paste the link to your JSFiddle or CodeSandbox example below: https://codesandbox.io/s/competent-mcnulty-o7nde?file=/src/App.tsxWhat is the expected behavior?
value
should be typeValue
.A little about versions:
react-use
: 15.3.3The text was updated successfully, but these errors were encountered: