Skip to content

Commit

Permalink
Rename useStateConst to useState'
Browse files Browse the repository at this point in the history
  • Loading branch information
jvliwanag committed Apr 28, 2020
1 parent 6d684f0 commit 3e8b10d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/React/Basic/Hooks.purs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module React.Basic.Hooks
, ReactChildren
, memo
, useState
, useStateConst
, useState'
, UseState
, useEffect
, useEffectOnce
Expand Down Expand Up @@ -167,11 +167,11 @@ useState initialState =
unsafeHook do
runEffectFn2 useState_ (mkFn2 Tuple) initialState

useStateConst ::
useState' ::
forall state.
state ->
Hook (UseState state) (state /\ (state -> Effect Unit))
useStateConst initialState =
useState' initialState =
useState initialState <#> rmap (_ <<< const)

foreign import data UseState :: Type -> Type -> Type
Expand Down

0 comments on commit 3e8b10d

Please sign in to comment.