0.0.14 • Published 9 years ago

pouchflux v0.0.14

Weekly downloads
4
License
Apache 2.0
Repository
github
Last release
9 years ago

PouchFlux

Flux with PouchDB

Simple example

Action

var alt = require('../alt');
var PouchActions = require('pouchflux/lib/PouchActions');

class ExampleActions extends PouchActions {
}

module.exports = alt.createActions(ExampleActions)

Store

var alt = require('../alt');
var PouchStore = require('pouchflux/lib/PouchStore');

var ExampleActions = require('../actions/ExampleActions');

var exampleStore = alt.createStore(class ExampleStore extends PouchStore {
  constructor() {
    super('exampleStore');
    this.bindActions(ExampleActions)
  }

});
module.exports = exampleStore;

You can choose to set the database name with the super function or later with the PouchActions.changeName({'name':'exampleStore'});

A more detailed example is in the ported version of the TodoStore from Alt.

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago