choo-resize

1.0.2 • Public • Published

choo-resize

Resize Event plugin for Choo. It simply adds an event handler to the window and emits the state.events.RESIZE event. Server-side rendering isn't working, yet.

Installation

npm i -S choo-resize

Example

const choo = require('choo')
const resize = require('choo-resize')
 
const app = choo()
 
app.use(resize(true))
app.route('*', require('./views/main'))
 
app.mount('body')
 

API

resize(render)

Takes an optional argument. If true emits the state.events.RENDER event too. If you only need to render when the page's resized.

Readme

Keywords

Package Sidebar

Install

npm i choo-resize

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

1.35 kB

Total Files

3

Last publish

Collaborators

  • kodedninja