@@ -28,9 +28,9 @@ import React.Basic.Types as React.Basic.Types
2828react
2929 :: forall props state fx
3030 . { displayName :: String
31- , initialState :: state
32- , receiveProps :: props -> state -> (SetState state fx ) -> Eff (react :: ReactFX | fx ) Unit
33- , render :: props -> state -> (SetState state fx ) -> JSX
31+ , initialState :: { | state }
32+ , receiveProps :: props -> { | state } -> (SetState state fx ) -> Eff (react :: ReactFX | fx ) Unit
33+ , render :: props -> { | state } -> (SetState state fx ) -> JSX
3434 }
3535 -> ReactComponent props
3636react { displayName, initialState, receiveProps, render } =
@@ -54,13 +54,13 @@ stateless
5454stateless { displayName, render } =
5555 react
5656 { displayName
57- , initialState: unit
57+ , initialState: {}
5858 , receiveProps: \_ _ _ -> pure unit
5959 , render: \props _ _ -> render props
6060 }
6161
6262-- | SetState uses an update function to modify the current state.
63- type SetState state fx = (state -> state ) -> Eff (react :: ReactFX | fx ) Unit
63+ type SetState state fx = ({ | state } -> { | state } ) -> Eff (react :: ReactFX | fx ) Unit
6464
6565-- | Create a `JSX` node from a React component, by providing the props.
6666createElement
@@ -94,9 +94,9 @@ fragmentKeyed = runFn2 fragmentKeyed_
9494foreign import component_
9595 :: forall props state fx
9696 . { displayName :: String
97- , initialState :: state
98- , receiveProps :: EffFn3 (react :: ReactFX | fx ) props state (SetState state fx ) Unit
99- , render :: Fn3 props state (SetState state fx ) JSX
97+ , initialState :: { | state }
98+ , receiveProps :: EffFn3 (react :: ReactFX | fx ) props { | state } (SetState state fx ) Unit
99+ , render :: Fn3 props { | state } (SetState state fx ) JSX
100100 }
101101 -> ReactComponent props
102102
0 commit comments