You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not type-safe to set a value after using a function as the defaultValue.
const[token,setToken]=useLocalState("token",()=>"computed value");// This line would raise a typescript error as `string` is not the same type as `() => S`;setToken("ABC123");
Which version of use-local-state are you using?
0.0.3
What version of React are you using use-local-state within?
16.8.0
What build/platform are you using?
Package test harness
What did you expect to happen?
Ability to set the value after using a computed function as the defaultValue.
What actually happened (e.g. what warnings or errors did you get)?
Typescript returns a warning that the new value does not match a function signature.
The text was updated successfully, but these errors were encountered:
It is not type-safe to set a value after using a function as the
defaultValue
.0.0.3
16.8.0
Package test harness
Ability to set the value after using a computed function as the
defaultValue
.Typescript returns a warning that the new value does not match a function signature.
The text was updated successfully, but these errors were encountered: