Tomas Trajan Profile picture
Mar 22 โ€ข 6 tweets โ€ข 3 min read
๐Ÿ…ฐ๏ธ #Angular signals ๐Ÿ“ก are all the hype and for a good reason!

As with every new thing, it will take time to learn how it works, so there are many misconceptions like...

๐Ÿค” Angular signals will make #RxJs obsolete

Let's build a better understanding to find an answer!

๐Ÿงต 1/4
The most important difference is that

๐Ÿ“ก signals are SYNC, good for
โœ… derived state (vs ngOnChanges)
โœ… local component reactive state, eg inputs

๐Ÿ” #RxJs is used for ASYNC (can be sync)
โœ… async orchestration
โœ… latest response (race conditions)
โœ… cancelation (perf)

๐Ÿงต 2/4
Signals & RxJs are optimized for handling different parts of the overall state management

Because of that the optimal real-world solutions will likely include both combined using provided interop

โœ… fromObservbale
โœ… fromSignal

We can get the best of both worlds!

๐Ÿงต 3/4
โš ๏ธ But remember that nothing is perfect!

๐Ÿ‘ด In the past people abused #RxJs for simple sync logic ๐Ÿ‘‰ which should be done with plain component logic (now with signals)

๐Ÿ”ฎ Soon people are going to abuse signals for async logic ๐Ÿ‘‰ which should be done with #RxJs instead!
๐Ÿงต 4/4
Do you enjoy this balanced in-depth view of various #Angular topics?

Then you may be interested in learning more about Angular Enterprise Architecture from my ebook which is written in the same balanced spirit!

angularexperts.io/products/ebookโ€ฆ
๐Ÿ“ก Make sure to subscribe to our new blog, to get notified about new #Angular articles!

angularexperts.io/blog

โ€ข โ€ข โ€ข

Missing some Tweet in this thread? You can try to force a refresh
ใ€€

Keep Current with Tomas Trajan

Tomas Trajan Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(