I am using rxfire to combine data from firestore in componentdidmount:
store$.pipe(
withLatestFrom(items$),
map(([store, items]) => ({ items, ...store })),
).pipe(
withLatestFrom(categories$),
map(([store, categories]) => ({ categories, ...store })),
).subscribe(store => {
this.setState({ store: store, isLoading: false });
})
The problem with this code is not firing and the screen stuck with the loading component. If I load the screen a second time it works. Am I doing something wrong? How can I fix it