SVELTEFUSE:RX

simple actions | pipeable stores

Go ahead, cross the streams.

What is this?

svelte-fuse-rx is a package for enhancing Svelte stores and event handling with RxJS.

Try it in your own Svelte project with npm i svelte-fuse-rx --save-dev or take a closer look on the docs page.

Why would I use it?

  1. An rxWritable store that can use all of Svelte's syntax like auto-subscribe, value-binding, and direct assignement AND implement the RxJS pipe to use any RxJS operators. Regular Svelte stores cannot do the latter, and regular RxJS "stores" (e.g. BehaviorSubject) cannot do the former.*
  2. Svelte actions to abstract common RxJS patterns. You don't need to know or learn RxJS to use them. (but you should, because it's fun and uniquely helpful)

*RxJS observables can (conveniently) use Svelte auto-subscribe out of the box.

Do I really need "all of RxJS" just for my small use case?

No, and you don't get "all of RxJS" in your production bundle if you only import the things you need. The rest is tree-shaken away.