slamdata/purescript-halogen-virtual-dom

Name: purescript-halogen-virtual-dom

Owner: SlamData, Inc.

Description: A virtual-dom driver for Halogen.

Created: 2017-01-27 14:58:59.0

Updated: 2017-06-13 01:04:17.0

Pushed: 2017-06-13 12:50:14.0

Homepage:

Size: 11

Language: PureScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

purescript-halogen-virtual-dom

Latest release Build status

A virtual-dom driver for Halogen.

Installation
r install purescript-halogen-virtual-dom
:warning: Note :warning:

You will also need to add virtual-dom as an NPM dependency to your project, and then use webpack or browserify to bundle it as part of the resulting JS file. If you're building with pulp then this is easy to do with the pulp browserify command.

Documentation

The main function of interest is Halogen.VirtualDOM.Driver.runUI. A minimal example of its usage:

le Main where

rt Prelude
rt Control.Monad.Eff (Eff)
rt Halogen.Aff as HA
rt Halogen.VirtualDOM.Driver (runUI)

 :: Eff (HA.HalogenEffects _) Unit
 = HA.runHalogenAff do
dy <- HA.awaitBody
nUI ?myComponent ?initialInput body

Module documentation is published on Pursuit.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.