I am using NgRx and Firestore and I am trying to figure a way to get the local store to stay synchronized with a firestore collection. I have an observable set up that fires when the firestore collection is updated, but in my reducer I'm not sure how to use the NgRx Entity adapter to replace what was in the store with the new data. I've tried addMany and upsertMany but they won't remove an item if it is deleted until the user refreshes.
The Reducer for my loadUsers Success Action looks like this
on(fromBatch.loadBatchesSuccess, (state: any, action: any) => ({...userAdapter.upsertMany(action.users, state), loaded: true, loading: false}))