Created
August 10, 2024 01:58
-
-
Save rybla/802686a68d667305a00777940544b727 to your computer and use it in GitHub Desktop.
example Halogen app setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Effect (Effect) | |
import Effect.Aff.Class (class MonadAff) | |
import Halogen as H | |
import Halogen.Aff as HA | |
import Halogen.HTML as HH | |
import Halogen.VDom.Driver as HVD | |
main :: Effect Unit | |
main = HA.runHalogenAff (HVD.runUI appComponent {} =<< HA.awaitBody) | |
appComponent :: forall query input output m. MonadAff m => H.Component query input output m | |
appComponent = H.mkComponent { initialState, eval, render } | |
where | |
initialState _ = {} | |
eval = H.mkEval H.defaultEval | |
render _ = HH.div [] [ HH.text "<App/>" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment