Skip to content

Commit

Permalink
docs: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
barbatus authored Sep 13, 2016
1 parent 7b43e16 commit 1a7d6d2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Meteor + RxJS
Use Meteor API in the RxJS style.

One of Meteor’s killer features is the reactive data integration of the server and client built upon the MongoDB oplog, which is, in other words, continues and immediate data interchange between these two tiers. At the same time, to simplify complexity dealing with the reactive data sources is what RxJS was designed and built for. So combing RxJS and Meteor API, we are bringing together best parts of two worlds.
One of Meteor’s killer features is the reactive data integration of the server and client built upon the MongoDB oplog, which is, in other words, continues and immediate data interchange between these two tiers. At the same time, to simplify complexity that dealing with the reactive data sources sometimes has is what RxJS was designed and built for. So combing RxJS and Meteor API, we are bringing together best parts of two worlds.

## Mongo Cursor Observable

As soon as you install this package (`npm install meteor-rxjs`), you have ability to use a special Mongo collection class that works
with cursor observables instead of the ordinary Mongo cursors. In other words, one can subscribe on the query data updates now as follows:
with cursor observables instead of the ordinary Mongo cursors. In other words, one can subscribe on the Mongo cursor's data updates now as follows:

```ts

Expand Down Expand Up @@ -50,13 +50,15 @@ const Tasks = new MongoObservable.Collection<Task>('tasks');
selector: 'task-list',
template: `<ul><li *ngFor="let task of tasks | async"></li></ul>`
})
class List {
class Tasks {
tasks = Tasks.find();
}

````

`meteor-rxjs` implements and exposes a special Zone operator for the Angular 2 users' convenience. It might be helpful if one wants to control when UI updates are made. For example, we can improve performance of the above component by debouncing UI updates as follows:
### Zone operator

`meteor-rxjs` implements and exposes a special Zone operator for the Angular 2 users' convenience. It might be helpful if one wants to control when UI updates are made. For example, we can improve performance of the above `Tasks` component by debouncing UI updates as follows:

```ts
Expand Down

0 comments on commit 1a7d6d2

Please sign in to comment.