UNPKG

@nozbe/watermelondb

Version:

Build powerful React Native and React web apps that scale from hundreds to tens of thousands of records and remain fast

11 lines (7 loc) 432 B
// @flow import type { Observable } from '../__wmelonRxShim' // Equivalent to observable |> distinctUntilChanged |> publishReplayLatestWhileConnected |> refCount // // Creates an observable that shares the connection with and replays the latest value from the underlying // observable, and skips emissions that are the same as the previous one export default function cacheWhileConnected<T>(source: Observable<T>): Observable<T>