feathers-offline-realtime-immutable
July 30, 2017 ยท View on GitHub
Offline-first realtime replication with optimistic updates.
Installation
npm install feathers-offline-realtime-immutable --save
Usage
const Realtime = require('feathers-offline-realtime-immutable');
const feathersClient = feathers()...;
const messages = feathersClient.service('/messages');
const messagesRealtime = new Realtime(messages, { subscriber: (records, last) => {
/**
* Store the records in your state manager. For example, if integrating with redux:
*
* store.dispatch(services.messages.store({ connected: messagesRealtime.connected, last, records }));
*
*/
}});
Documentation
You can read the docs here.
License
Copyright (c) 2017
Licensed under the MIT license.