0.1.1 • Published 5 years ago

stakit-choo v0.1.1

Weekly downloads
2
License
ISC
Repository
-
Last release
5 years ago

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.

0.1.1

5 years ago

0.1.0

5 years ago