Skip to content

Why using RxJS with XState? #1857

Answered by davidkpiano
tjdam asked this question in Q&A
Jan 16, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Practically speaking, if you don't know why you would use RxJS with XState, do not use RxJS with XState.

This is one of those things where you'll know when you need it, and most of the time, you won't.

But if you're curious, RxJS allows you to create complex streams of values, which can be turned into a stream of events, which can be invoked in XState; and the opposite is true, too: if you're already using RxJS in your app, it's helpful to know that XState services can be consumed as observables.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@tjdam
Comment options

@davidkpiano
Comment options

@tjdam
Comment options

Answer selected by tjdam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants