-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
The current signature for useState is polymorphic over any state:
useState ::
forall state.
state ->
Hook (UseState state) (state /\ ((state -> state) -> Effect Unit))However, if the state is a function in react, it tries to lazily evaluate the function: https://reactjs.org/docs/hooks-reference.html#lazy-initial-state. Should this case be encapsulated somehow in the library?
maddie927
Metadata
Metadata
Assignees
Labels
No labels