Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wejendorp/local-collection-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
wejendorp committed Sep 23, 2013
2 parents 4f92fc1 + d05692e commit 75eb935
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and update the fields when (if) more data becomes available.
This will make collections work in offline mode, or just present cached data
until the server gets around to responding.

## Future
Keep track of unsaved models and sync when possible.

## Installation

$ component install wejendorp/local-collection-sync
Expand All @@ -20,10 +23,10 @@ from cache on refresh, and new items will pop up when server responds to fetch.
var userCollection = require('usercollection');

var users = userCollection.fetch('active');
users.each(show);
users.each(show); // Show cached results

users.on('change', function() {
this.each(show);
this.each(show); // Show server results
});

var body = document.body;
Expand Down Expand Up @@ -70,4 +73,4 @@ TODO
- [visionmedia/superagent](https://github.com/visionmedia/superagent)

## License
MIT
MIT

0 comments on commit 75eb935

Please sign in to comment.