liqula / react-hs

A GHCJS binding to React based on the Flux design. The flux design pushes state and complicated logic out of the view, allowing the rendering functions and event handlers to be pure Haskell functions.
32 stars 10 forks source link

Gitter chat

A GHCJS binding to React based on the Flux design. The flux design pushes state and complicated logic out of the view, allowing the rendering functions and event handlers to be pure Haskell functions. When combined with React's composable components and the one-way flow of data, React, Flux, and GHCJS work very well together.

Project Status

ORPHANED IN EXPERIMENTAL STAGE

to be specific, this means:

you've been warned!

Getting started

Add this to your stack.yaml:

packages:
- location:
    git: https://github.com/liqula/react-hs
    commit: 8eb9d31fcfa0a79ef006565f299d47b210bdd690  # please check if that's still the most recent commit on master.
  extra-dep: true
  subdirs:
  - react-hs
  - react-hs-servant
  - react-hs-examples

Then read the rest of this README and the READMEs in the packages.

Details

This is a fork of three unmaintained bitbucket repositories:

We are currently working on getting the change logs and issue lists updated. Having this said and with the caveat that you may have to read a lot of source code to get it to do what you want, we believe this version already works a lot better than the original.

Package version numbers are chosen in accordance with https://pvp.haskell.org/.

See the package READMEs for more info.

Please vote on the open issues to help decide which to work on first.

Changes since react-flux

Migration

If you have code that works with react-flux 1.2.3 (the latest on hackage as of the time of this fork), you need to make a few changes. Refer to the TODO app in react-hs-examples for some of the details.

I think that's the gist of it, but I'm pretty sure i forgot a few interesting details. If you need more details or run into any questions, please open an issue.

Related (in no particular order)