Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RxJs Operator: stateful() #462

Open
mikelgo opened this issue Jul 19, 2024 · 2 comments
Open

RxJs Operator: stateful() #462

mikelgo opened this issue Jul 19, 2024 · 2 comments

Comments

@mikelgo
Copy link
Contributor

mikelgo commented Jul 19, 2024

Hi, I would like to contribute an RxJs Operator which will take a underlying (async) source and
emits some stateful values.

Example

http = inject(http)

// will emit: 
// {value: undefined, error:undefined, isLoading:true}
// {value: T, error:undefined, isLoading:false}
data$ = this.http.get(...).pipe(
  stateful()
)

This can also be combined with the derivedLoading-operator/behavior I contributed recently

@ajitzero
Copy link
Contributor

See #56 for original ask and discussion. #354 is similar too, with a slightly different usage API.

For some of my projects, I maintain a custom RxJs operator for this but would love to have something more standard.

@mikelgo
Copy link
Contributor Author

mikelgo commented Jul 19, 2024

I see. As far as I can see there's so far no conclusion if this feature should be implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants