Reactive Utilities

observable

Edit this page
function observable<T>(input: () => T): Observable<T>

This method takes a signal and produces an Observable. You can consume it from another Observable library of your choice, typically with the from operator.

// How to integrate rxjs with a Solid signal
import { observable } from "solid-js"
import { from } from "rxjs"
const [s, set] = createSignal(0)
const obsv$ = from(observable(s))
obsv$.subscribe((v) => console.log(v))

You can also use from without rxjs; check out this page.

Report an issue with this page