Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1.33 KB

README.md

File metadata and controls

28 lines (21 loc) · 1.33 KB

Snabbare

GitHub GitHub release (latest by date) Pursuit Maintainer: aryzach

A PureScript virtual DOM library with an Elm-like interface based on Snabbare.

Docs

The general use of this library:

  • build up an Element which constists of
    • an HTML tag
    • an array of 'modifiers' which consists of both HTML attributes and DOM properties
    • and an array of child Elements
  • call elementToVNode with
    • the Element created above
    • function that takes any message (generally a custom sum type) and updates application state and renders that updated state
  • call patch with
    • the output of elementToVNode
    • and the previous output of elementToVNode from a prior application state

Examples

To see an example, run make build-input-example then make run-input-example, then go to localhost:8080 Following the Dockerfile-example file, you can see how to go from spago init to using this library in a project