Open tonypee opened 8 years ago
scratch that, 1 dependancy (firebase) is definitely best.
import firebase from 'firebase'
export class ReactiveCollection {
_ref = null;
_valueMap = new Map();
items = [];
constructor(path) {
this._ref = firebase.database().ref(path)
this._listenToQuery(this._ref);
}
I just wanted to quickly integrate the ReactiveCollection in my app, so i thought that it would work well if it just took a ref() therefore, it doesnt need any other dependencies:
https://gist.github.com/tonypee/c2dcf22a1f3075e388fc0a7454a88ef6
Maybe this would be a good feature