Package

purescript-concur-react

Repository
ajnsit/purescript-concur
License
MIT
Uploaded by
ajnsit
Published on
2019-01-24

Join the chat at https://gitter.im/concurhaskell Join the chat at https://gitter.im/concurhaskell

Concur UI Lib is a brand new client side Web UI framework that explores an entirely new paradigm. It does not follow FRP (think Reflex or Reactive Banana), or Elm architecture, but aims to combine the best parts of both. This repo contains the Concur implementation for Purescript, using the React backend.

Documentation

Work in progress tutorials are published in the Concur Documentation site

API documentation is published on Pursuit.

Ports to other languages

  1. Concur for Haskell - The original version of Concur written in Haskell.
  2. Concur for Javascript - An official but experimental port to Javascript.

Installation

You can quickly get a production setup going (using Parcel) by cloning the Purescript Concur Starter.

Else you can also install purescript-concur manually using bower -

bower install purescript-concur-react

Building examples from source

git clone https://github.com/ajnsit/purescript-concur.git
cd purescript-concur
npm install
# Build examples
npm run ps
# Check examples
open html/index.html

External React Components

Concur supports using external React components. For example, there is an ongoing effort to create concur bindings for SemanticUI-React. Look at the Sources, and the Demo.

Examples

Demo and Source for composing all the examples in one page.

Individual example sources -

  1. Hello World! Shows simple effectful widgets. Source.
  2. A simple counter widget. Source.
  3. A login widget. Source.
  4. Concur has Signals! Example counting widget implemented with Signals! Source.
  5. A full-featured TodoMVC implementation with Signals. Source.
  6. A fully editable tree in ~30 lines of code (with Signals). Source.
  7. A postfix calculator. Source.
  8. Using AJAX and handling JSON responses. Source.
  9. A small widget to visualise CSS color codes. Source.
  10. Asynchronous timers which can be cancelled. Source.
  11. Performance test - A huge list of 50 thousand parallel buttons. This has two variants, fast (uses slightly lower level interface) and slow (idiomatic concur code). Source.