react-haskell alternatives and similar packages
Based on the "Web" category.
Alternatively, view react-haskell alternatives based on common mentions on social networks and blogs.
-
yesod-persistent
A RESTful Haskell web framework built on WAI. -
servant
Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more! -
haskell-bitmex-rest
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
scotty
Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp (Official Repository) -
swagger-petstore
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
neuron
Future-proof note-taking and publishing based on Zettelkasten (superseded by Emanote: https://github.com/srid/emanote) -
haskell-kubernetes
Haskell bindings to the Kubernetes API (via swagger-codegen) -
airship
Helium + Webmachine = Airship. A toolkit for building declarative, RESTful web apps. -
apecs-gloss
a fast, extensible, type driven Haskell ECS framework for games -
digestive-functors
A general way to consume input using applicative functors -
servant-elm
Automatically derive Elm functions to query servant webservices -
hbro
[Unmaintained] A minimal web-browser written and configured in Haskell. -
tagsoup
Haskell library for parsing and extracting information from (possibly malformed) HTML/XML documents -
backprop
Heterogeneous automatic differentiation ("backpropagation") in Haskell -
kubernetes-client-core
Haskell client for the kubernetes API. A work in progress. -
engine-io
A Haskell server implementation of the Engine.IO and Socket.IO (1.0) protocols -
keera-hails-reactive-htmldom
Keera Hails: Haskell on Rails - Reactive Programming Framework for Interactive Haskell applications -
ghcjs-base
base library for GHCJS for JavaScript interaction and marshalling, used by higher level libraries like JSC -
android-lint-summary
Prettier display of Android Lint issues -
validity-scientific
Validity and validity-based testing
Access the most powerful time series database as a service
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of react-haskell or a related project?
README
React-Haskell 
As crazy as it seems, using React and Haskell together just may be a good idea.
I was driven to create this thing because I had a large existing Haskell codebase I wanted to put online. However, even without existing code, I think a lot of problems are better modeled in Haskell than JavaScript or other languages. Or you might want to use some existing Haskell libraries.
Examples
Let's put a simple paragraph on the page:
sample :: ReactNode a
sample = p_ [ class_ "style" ] $ em_ "Andy Warhol"
main :: IO ()
main = do
Just doc <- currentDocument
let elemId :: JSString
elemId = "inject"
Just elem <- documentGetElementById doc elemId
render sample elem
That creates a DOM node on the page that looks like:
<p class="style">
<em>Andy Warhol</em>
</p>
We can make that a little more complicated with some more child nodes.
sample :: ReactNode a
sample = div_ [ class_ "beautify" ] $ do
"The Velvet Underground"
input_
"Lou Reed"
But of course that input doesn't do anything. Let's change that.
sample :: JSString -> ReactNode JSString
sample = div_ $ do
"Favorite artist:"
input_ [ onChange (Just . value . target) ]
text str
Getting Started
The first step is a working GHCJS installation. The easiest way is to download a virtual machine with GHCJS pre-installed. I recommend ghcjs-box.
Now that GHCJS is installed we can use cabal to create a project.
$ mkdir project
$ cd project
$ cabal init # generate a .cabal file
Now edit the cabal file to include dependencies.
build-depends:
base >= 4.8 && < 5,
ghcjs-base,
ghcjs-dom,
react-haskell >= 1.3
Now we can write Main.hs
.
sample :: ReactNode a
sample = p_ [ class_ "style" ] $ em_ "Andy Warhol"
main :: IO ()
main = do
Just elem <- elemById "id"
render sample elem
Next Steps
Reference
Additional Resources
Is it Right for Me?
React-Haskell is a great tool for building web UI from Haskell. However, you may want to consider the alternatives:
- By writing plain React / JSX you can speed development by avoiding the GHCJS compilation step. This also has the advantage of being a bit more universal - more people use React through JSX than React-Haskell.
- ghcjs-react is a very similar project.
- Reflex is an FRP system built with GHCJS in mind.
Small Print
*Note that all licence references and agreements mentioned in the react-haskell README section above
are relevant to that project's source code only.