Skip to content

Commit 03ad8ed

Browse files
committed
Renaming some internal variables
1 parent b7ff54d commit 03ad8ed

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

spago.test.dhall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
let conf = ./spago.dhall
22

3-
let dependencies = [ "console", "spec" ]
3+
let dependencies = [ "spec" ]
44

55
let sources = [ "test/**/*.purs" ]
66

src/React/Halo/Component.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ useHalo ::
3333
useHalo { props, initialState, eval } =
3434
React.coerceHook React.do
3535
state /\ setState <- React.useState' initialState
36-
halo <- React.useMemo unit \_ -> unsafePerformEffect (createInitialState { props, initialState, eval, update: setState })
36+
halo <- React.useMemo unit \_ -> unsafePerformEffect (createInitialState { props, state: initialState, eval, update: setState })
3737
React.useEffectOnce (runInitialize halo *> pure (runFinalize halo))
3838
React.useEffectAlways (handleUpdate halo props *> mempty)
3939
pure (state /\ handleAction halo)

src/React/Halo/Internal/State.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ newtype HaloState props state action
2727
createInitialState ::
2828
forall props state action.
2929
{ props :: props
30-
, initialState :: state
30+
, state :: state
3131
, eval :: Lifecycle props action -> HaloM props state action Aff Unit
3232
, update :: state -> Effect Unit
3333
} ->
@@ -36,7 +36,7 @@ createInitialState spec@{ eval, update } = do
3636
finalized <- Ref.new false
3737
fresh' <- Ref.new 0
3838
props <- Ref.new spec.props
39-
state <- Ref.new spec.initialState
39+
state <- Ref.new spec.state
4040
subscriptions <- Ref.new Map.empty
4141
forks <- Ref.new Map.empty
4242
pure $ HaloState { eval, update, finalized, props, state, fresh: fresh', subscriptions, forks }

0 commit comments

Comments
 (0)