matthunz / ui

A reactive graph in Haskell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

counter :: Html IO
counter = _component $ do
  x <- signal (0 :: Int)

  return $
    _div
      [("class", _attr $ pure "main")]
      [ _text $ do
          x' <- readS x
          return $ "High five count: " ++ show x',
        _div
          [_on "click" (modifySIO (+ 1) x)]
          [_text $ pure "Up high!"],
        _div
          [_on "click" (modifySIO ((-) 1) x)]
          [_text $ pure "Down low!"]
      ]

About

A reactive graph in Haskell

License:Apache License 2.0


Languages

Language:Haskell 100.0%