Skip to content

Commit 0b2bd4b

Browse files
committed
Renamed hooks to context
1 parent fd08868 commit 0b2bd4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/React/Halo/Component.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ useHalo { props, context, initialState, eval } =
4343
pure (state /\ handleAction halo)
4444

4545
type ComponentSpec hooks props ctx state action m
46-
= { hooks :: props -> Render Unit hooks ctx
46+
= { context :: props -> Render Unit hooks ctx
4747
, initialState :: props -> ctx -> state
4848
, eval :: Lifecycle props ctx action -> HaloM props ctx state action m Unit
4949
, render ::
@@ -63,7 +63,7 @@ component ::
6363
Component props
6464
component name spec@{ eval, render } =
6565
React.component name \props -> React.do
66-
context <- spec.hooks props
66+
context <- spec.context props
6767
initialState <- React.useMemo unit \_ -> spec.initialState props context
6868
state /\ send <- useHalo { props, context, initialState, eval }
6969
pure (render { props, context, state, send })

0 commit comments

Comments
 (0)