-
Notifications
You must be signed in to change notification settings - Fork 93
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
feat: add toObservableSignal() #230
Conversation
`toObservableSignal()` combines the functionality of Angular Signal and RxJS Observable.
☁️ Nx Cloud ReportCI is running/has finished running commands for commit ddb23c1. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 3 targetsSent with 💌 from NxCloud. |
Linter says
Please let me know if I can fix this. |
Hi! There are 2 things I'm a little bit "bothered" about here (if I'm not wrong 😅 I'm on my phone so I can't test m'y sayings, sorry) :
=> Is it really a good thing to have something that "unstable"? |
That's ok, it is your explicit choice. You could use a Signal (not a WritableSignal) as an argument, and then everything would work fine. But if you explicitly want to send WritableSignal as an argument, and then cut the result using
Only the output of |
Alright, it makes sense! Thanks for the clarification 🙂 |
@e-oz I like this idea, what do you think about an option whether the observable is hot or cold? When you specify hot it would skip the initial value. |
@RobbyRabbitman We could, indeed, change it, and control if the first value should be written to an observable synchronously (instantly) or if it should be skipped. Maybe later :) For now, I prefer to rely on |
By hot I meant to skip the value, which is read the first time by the effect. Maybe that's the wrong term. |
@e-oz Fixed the lint issue. I'll merge as soon as CI's green. Thank you |
toObservableSignal()
combines the functionality of Angular Signal and RxJS Observable.StackBlitz
https://stackblitz.com/edit/stackblitz-starters-owzm3q?file=src%2Fmain.ts
Usage