Package Exports
- nanoraf
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nanoraf) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
nanoraf 
Only call RAF when needed.
Usage
const nanoraf = require('nanoraf')
const frame = nanoraf(function render (state) {
console.log(state.now)
})
frame({ now: date.now() })
frame({ now: date.now() })
frame({ now: date.now() })
frame({ now: date.now() })API
frame = nanoraf(render)
Wrap a render function that is called on every raf tick. If no new data is
available, it will not tick. Passes the last version of the data on every tick.
frame(state)
Pass new data into the render function, to be called on a new tick.
Installation
$ npm install nanoraf