Skip to content

nonbili/purescript-lit-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

purescript-lit-html

purescript-lit-html on Pursuit

A PureScript wrapper of lit-html.

Usage

import LitHtml as LitHtml
import Web.DOM (Element)

renderTitle :: Element -> Effect Unit
renderTitle el =
  tpl <- LitHtml.mkHtmlTemplate "<h1 id='title'>${title}</h1>"
  LitHtml.render el tpl { title: "new title" }

Development

cd example
yarn
spago build -w
yarn start