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

Support for optional defaultValue. #8

Open
PauloMFJ opened this issue Mar 2, 2021 · 1 comment
Open

Support for optional defaultValue. #8

PauloMFJ opened this issue Mar 2, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@PauloMFJ
Copy link

PauloMFJ commented Mar 2, 2021

Clearly describe the bug

useLocalState doesn't support optional defaultValue.

Which version of use-local-state are you using?

0.1.0

What version of React are you using use-local-state within?

16.8.0

What build/platform are you using?

New package tests.

What did you expect to happen?

Ability to define just a key without enforcing a defaultValue, ie: setLocalState<string | undefined>("KEY").

What actually happened (e.g. what warnings or errors did you get)?

Typescript errors as defaultValue is required.

@PauloMFJ PauloMFJ added the bug Something isn't working label Mar 2, 2021
@PauloMFJ PauloMFJ self-assigned this Mar 2, 2021
@digitaljohn
Copy link
Contributor

@PauloMFJ want to tackle this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants