0

Is there any possibilities to replace pipe, map, observable of rxjs operators with Angular signals, while manage api call and their response according to requiremnt.

Tried for manage api call response, but I think didn't get fast response as compare to rxjs operators. It's managable is somehow difficult.

Expecting your experience with signals and response time of modified data.

1
  • 1
    Signals aren't a replacement 1-to-1 for observables. Commented Feb 21, 2024 at 12:59

1 Answer 1

1

API calls return value asynchronously, after some time.

Signals always have a value, and they are synchronous only. Even if you accept "undefined" as an absence of value, you still can not use Signals to produce asynchronous value.

For API calls you still need Observables or Promises.

Many RxJS operators adjust the moment when a new value should be emitted - Signals always have a value, they do not emit new values (they only notify that the value is changed), and can not adjust the moment of notification - it should happen synchronously.

Because of this, RxJS operators can not be re-implemented for Signals.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.