Skip to content

stakit/stakit-choo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stakit-choo

Stakit utilities for Choo.

Stability NPM version

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.

About

Stakit utilities for Choo

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published