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