Skip to content

RunOpenCode/rx-stencil

Repository files navigation

@runopencode/rx-stencil

npm version

This is a small utility library which provides a set of useful functions for working with Stencil components in conjunction with RxJS. RxJS is not, in general, well integrated with Stencil, nor core concepts of Stencil in regard to reactivity. However, certain problems can be solved much easier with RxJS, especially when it comes to working with problems related to executing HTTP request, with requirements such as debouncing, throttling, retrying, etc.

Major motivation for developing this library was to provide a simple way to integrate RxJS with Stencil since Stencil can be successfully used as framework-agnostic approach for developing design systems as well as smart components for server-side rendered applications. In conjunction with @runopencode/http Stencil can be used to communicate with RESTful APIs through RxJS and observables, instead of using imperative approach with Promises. This allows you to write very complex, glitch-free, components. Of course, you can use this library with any other HTTP client, or fetch API, wrapped by RxJS observables using function "fromFetch()".

Table of contents

TODO

  • Add moar tests.
  • Add observables for other Stencil lifecycle events.

About

ReactiveX (RxJS) utilities for Stencil

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published