-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I've observed a few scenario when this happens:
- The stream hasn't been 'subscribed' yet using the associated
usehook. - The stream was subscribed with the associated
usehook, but the component in which the subscription lived, was unmounted by the time I expected the stream to emit a value. This can be alleviated somewhat with a<Subscribe>component. - Values in the stream passes through a
filteroperation. For example, I use aparsedValue$$->validValue$$stream, which filters outError(e)values, and lets onlyOk(v)pass through. Now, often,validValue$$stream doesn't produce a value when I expect it to. This happens mostly during a formSubmit, where the stream that processes a formSubmit event checks that validValue$$ streams of all of the input value have a latest valid value.
Now, I know all of the 3 points are on me. As in, I need to ensure that the subscription is alive, and that I am responsible for the logic in parsed$$->valid$$.
But examining what went wrong feels like drudgery. Are there ways to make it easy? I am just looking for ideas in case someone has experienced this.
My experience with RxJS is also limited to just react-rxjs. In general, do you recommend rxjs marbles to test and debug rxjs streams? or something else?
Metadata
Metadata
Assignees
Labels
No labels