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
I have a value that is of type Profunctor: const testProf = useProfunctorState("foo");
With this setup, I have no problem updating the state with function, like testProf.setState(() => "bar")
However, if I try to use a new value instead of a function, TypeScript throws an error. For example, if I write testProf.setState("bar"), TypeScript says "Argument of type '"bar"' is not assignable to parameter of type 'Updater'. "
I'm relatively new to TS so I am not sure how to fix this in the package source. Any suggestions would be appreciated.
The text was updated successfully, but these errors were encountered:
I have a value that is of type Profunctor:
const testProf = useProfunctorState("foo");
With this setup, I have no problem updating the state with function, like
testProf.setState(() => "bar")
However, if I try to use a new value instead of a function, TypeScript throws an error. For example, if I write
testProf.setState("bar")
, TypeScript says "Argument of type '"bar"' is not assignable to parameter of type 'Updater'. "I'm relatively new to TS so I am not sure how to fix this in the package source. Any suggestions would be appreciated.
The text was updated successfully, but these errors were encountered: