choo-persist-cordova

1.0.2 • Public • Published

choo-persist-cordova

persist choo state with the cordova file api

Install cordova file plugin
cordova plugin add cordova-plugin-file

See /www for cordova example

var choo           = require('choo')
var html           = require('choo/html')
var css            = require('sheetify')
var _app           = choo ()

_app.use(require('choo-persist-cordova')())

_app.use(function (state, emitter) {
     if (!state.incro) state.incro = 0
})

_app.route('/', function (state, emit) {
    var style = css`
      :host {
        padding-left: 9px;
      }
    `
    state.incro = state.incro + 1
    return html`
       <div class=${style}>
        <h1>HELLO</h1>
        <p>hello world ${state.incro}!</p>
       </div>
     `
})
Install
npm install choo-persist-cordova --save

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    2
  • 1.0.1
    2
  • 1.0.0
    1

Package Sidebar

Install

npm i choo-persist-cordova

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • m-onz