stakit-choo
v0.1.1
Published
Stakit utilities for Choo
Downloads
3
Readme
stakit-choo
Stakit utilities for Choo.
Installation
npm i stakit-choo
Example
var stakit = require('stakit')
var { render, hydrate } = require('stakit-choo')
var app = require('./app')
stakit()
.routes(function () {
return ['/', '/about']
})
.render(render(app))
.transform(hydrate)
.output()
Usage
Currently provides a renderer and a transform.
stakitChoo.render(app)
Renders the page using app.toString
.
stakitChoo.hydrate
A simple transform that appends a script that sets window.initialState
to the state of the page, aka. rehydration.