Multiple components: still WIP but compiling.

master
Philippe Pittoli 2023-05-22 16:23:21 +02:00
parent 778a51604b
commit 48006c37e8
2 changed files with 10 additions and 8 deletions

View File

@ -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

View File

@ -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