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
useDefault types #292
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I used the
useDefault
hook in my project with typescript in strict mode and had a little issue with the types returned byuseDefault
.If I write the following code
then
foo
isstring | null
.I would expect foo to be
string
since the passed default value is astring
. So I was wondering if the types foruseDefault
are correct? Or am I missing something?The text was updated successfully, but these errors were encountered: