Simple conversion functions to allow interop of Svelte style stores with RxJS style stores
Promise
instance which tracks the state from a readable store containing a promise state# pnpm
$ pnpm add @crikey/stores-rxjs
# npm
$ npm add @crikey/stores-rxjs
# yarn
$ yarn add @crikey/stores-rxjs
the store to create an observable from
Convert an RxJS Observable to a svelte compatible store. note: subscribers will be signaled with undefined upon subscription unless the observable fires a signal synchronously note: RxJs Observables do not support the necessary constructs to avoid the diamond dependency problem note: Each new subscription to the created store will create a new subscription to the underlying observable. "This shows how subscribe calls are not shared among multiple Observers of the same Observable. When calling observable.subscribe with an Observer, the function subscribe in new Observable(function subscribe(subscriber) {...}) is run for that given subscriber. Each call to observable.subscribe triggers its own independent setup for that given subscriber."
observable to convert into a store
Convert an RxJS Observable to a svelte compatible store. note: subscribers will be signaled with initial_value upon subscription unless the observable fires a signal synchronously note: RxJs Observables do not support the necessary constructs to avoid the diamond dependency problem note: Each new subscription to the created store will create a new subscription to the underlying observable. "This shows how subscribe calls are not shared among multiple Observers of the same Observable. When calling observable.subscribe with an Observer, the function subscribe in new Observable(function subscribe(subscriber) {...}) is run for that given subscriber. Each call to observable.subscribe triggers its own independent setup for that given subscriber."
observable to convert into a store
initial_value to signal with if the observable doesn't immediately signal a value
Convert an RxJS Observable to a svelte compatible store. note: subscribers will be signaled with initial_value upon subscription unless the observable fires a signal synchronously note: RxJs Observables do not support the necessary constructs to avoid the diamond dependency problem note: Each new subscription to the created store will create a new subscription to the underlying observable. "This shows how subscribe calls are not shared among multiple Observers of the same Observable. When calling observable.subscribe with an Observer, the function subscribe in new Observable(function subscribe(subscriber) {...}) is run for that given subscriber. Each call to observable.subscribe triggers its own independent setup for that given subscriber."
observable to convert into a store
initial_value to signal with if the observable doesn't immediately signal a value
Convert an RxJS Observable to a svelte compatible store. note: subscribers will be signaled with undefined upon subscription unless the observable fires a signal synchronously note: RxJs Observables do not support the necessary constructs to avoid the diamond dependency problem note: Upon initial subscription, the store will begin receiving signals from the observer and continue until manually unlinked. Unlike traditional RxJS observables, signals originating from the constructor will not be re-sent.
observable to convert into a store
Convert an RxJS Observable to a svelte compatible store. note: subscribers will be signaled with undefined upon subscription unless the observable fires a signal synchronously note: RxJs Observables do not support the necessary constructs to avoid the diamond dependency problem note: Upon initial subscription, the store will begin receiving signals from the observer and continue until manually unlinked. Unlike traditional RxJS observables, signals originating from the constructor will not be re-sent.
observable to convert into a store
initial_value to signal with if the observable doesn't immediately signal a value
Convert an RxJS Observable to a svelte compatible store. note: subscribers will be signaled with undefined upon subscription unless the observable fires a signal synchronously note: RxJs Observables do not support the necessary constructs to avoid the diamond dependency problem note: Upon initial subscription, the store will begin receiving signals from the observer and continue until manually unlinked. Unlike traditional RxJS observables, signals originating from the constructor will not be re-sent.
observable to convert into a store
initial_value to signal with if the observable doesn't immediately signal a value
Generated using TypeDoc
Create an observable from the given store. The observable will emit a signal for the initial store value as well as all subsequent changes