Multiple components: still WIP but compiling.
parent
778a51604b
commit
48006c37e8
|
@ -125,7 +125,7 @@ main = do
|
||||||
HA.runHalogenAff do
|
HA.runHalogenAff do
|
||||||
body <- HA.awaitBody
|
body <- HA.awaitBody
|
||||||
let url = "ws://localhost:8080"
|
let url = "ws://localhost:8080"
|
||||||
runUI rootComponent url body
|
runUI component url body
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- WebSocket message type
|
-- WebSocket message type
|
||||||
|
@ -137,6 +137,8 @@ type WebSocketMessageType = ArrayBuffer
|
||||||
-- Root component module
|
-- Root component module
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
type Slot = H.Slot Query Void
|
||||||
|
|
||||||
type Query :: forall k. k -> Type
|
type Query :: forall k. k -> Type
|
||||||
type Query = Const Void
|
type Query = Const Void
|
||||||
type Input = String
|
type Input = String
|
||||||
|
@ -161,8 +163,8 @@ type State =
|
||||||
, canReconnect :: Boolean
|
, canReconnect :: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
rootComponent :: forall m. MonadAff m => H.Component Query Input Output m
|
component :: forall m. MonadAff m => H.Component Query Input Output m
|
||||||
rootComponent =
|
component =
|
||||||
H.mkComponent
|
H.mkComponent
|
||||||
{ initialState
|
{ initialState
|
||||||
, render
|
, render
|
||||||
|
|
|
@ -121,11 +121,11 @@ renderError = case _ of
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
main :: Effect Unit
|
main :: Effect Unit
|
||||||
main = do
|
main = HA.runHalogenAff do
|
||||||
HA.runHalogenAff do
|
|
||||||
body <- HA.awaitBody
|
body <- HA.awaitBody
|
||||||
let url = "ws://localhost:8080"
|
let url = "ws://localhost:8080"
|
||||||
runUI rootComponent url body
|
runUI rootComponent url body
|
||||||
|
-- runUI Container.component unit body
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- WebSocket message type
|
-- WebSocket message type
|
||||||
|
|
Loading…
Reference in New Issue