react-haskell: Haskell React bindings

[ library, mit, web ] [ Propose Tags ]

This package provides high level bindings to Facebook's React library, meant for use with Haste.

React is a JavaScript library for building user interfaces. React (and React-Haskell) is focused on just UI - it's not a framework.

Currently React-Haskell can render simple stateful components, but not what React calls classes. Put another way, React-Haskell doesn't support lifecycle methods yet.

Here's a simple example which demonstrates basic elements, attributes, state, and handling events.

statefulView :: StatefulReact JSString ()
statefulView = div_ <! class_ "container" $ do
    str <- getState
    input_ <! value_ str
           <! onChange (\_ evt -> toJSStr $ map toUpper $ fromJSStr $ targetValue evt)
Versions [faq] 1.1.0.0, 1.2.0.0, 1.3.0.0, 2.0.0, 2.0.1
Dependencies base (>=4.5 && <4.7), haste-compiler, haste-lib (==0.4.*), monads-tf, transformers [details]
License MIT
Author Joel Burget
Maintainer joelburget@gmail.com
Category Web
Home page https://github.com/joelburget/react-haskell
Bug tracker https://github.com/joelburget/react-haskell/issues
Source repo head: git clone https://github.com/joelburget/react-haskell.git
Uploaded by joelb at Tue Dec 9 06:53:03 UTC 2014
Distributions NixOS:2.0.1
Downloads 2560 total (160 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
All reported builds failed as of 2016-12-12 [all 5 reports]

Modules

  • React

Flags

NameDescriptionDefaultType
haste-inst

Built with haste-inst/hastec

DisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees