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

16 lines (12 loc) 351 B
// @flow import { defer, type Observable } from '../__wmelonRxShim' // Performs an action when Observable is subscribed to; analogous to `Observable.do` export default function doOnSubscribe<T>( onSubscribe: () => void, ): (Observable<T>) => Observable<T> { return (source) => defer(() => { onSubscribe() return source }) }