Angular's new httpResource and a bonus hidden feature

 The first release candidate for Angular 19.2 is out, and it includes the new experimental httpResource.

This is essentially a specialised version of a standard resource that can be used specifically for loading data from HTTP endpoints.

But, that isn't what I found most interesting about this update. There was also a change to the way resources work in general, with the addition of the option to "stream" data via the mechanism of a Promise that is resolved with a signal.

This overcomes a previous limitation of rxResource, where we could only get the first result returned from an observable stream. This opens up some interesting new possibilities

No comments:

Post a Comment

Angular's new httpResource and a bonus hidden feature

  The first   release candidate   for   Angular 19.2   is out, and it includes the new experimental   httpResource . This is essentially a s...

Best for you