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
Size: 11
Language: PureScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A virtual-dom driver for Halogen.
r install purescript-halogen-virtual-dom
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.
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.