Closed hakimio closed 2 years ago
@hakimio I published a new version if you want to try it: npm install akita-ng-fire@7.0.0-beta.3
@GrandSchtroumpf Thanks for merging this and releasing new version.
I've just tested it locally with my project and everything seems to be working as expected now without any need for distinctUntilChanged
operator.
Last few minor improvements that could be done to v7
branch:
docRef
and collectionRef
casting in the code, you could use withConverter()
method like in the following example:
const converter: FirestoreDataConverter<EntityType> = {
fromFirestore: snapshot => this.formatFromFirestore({
...snapshot.data()
}),
toFirestore: entity => this.formatToFirestore(entity)
};
const docRef = doc(this.db, key).withConverter<EntityType>(converter);
I don't plan to create a PR for this since from my point of view it doesn't add any value but could result in some breaking changes, especially if you plan to remove formatFromFirestore()/formatToFirestore()
calls from other places in the code.
v7
release.
Simplified version of #226