Help writing a withResource
signal store feature
#4702
-
with angular 19 releasing the
what this would do is create a
This would make it incredibly easy to set up rxResources the same way across signal stores while also providing the flexibility to use signalStore-specific state/services to supply the My issue with implementing this is having access to the current store state AND injecting services in the same callback function while also getting the typing correct of the signalStoreFeature method. I have been attempting to do something like this but cant quite figure it out (the below definitely is not happy):
If i could just get the type of the Any help on this would be greatly appreciated! It is obviously very easy to work around this and just add my own resources to a later |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @skyleguy 👋, We’re aware of the need for That said, I’m quite optimistic that we’ll see a solid integration in v20. Until then, you can either rely on self-written extensions or simply use |
Beta Was this translation helpful? Give feedback.
Hi @skyleguy 👋,
We’re aware of the need for
linkedSignal
andresource
(and friends), but we’ve decided to hold off on implementation untilresource
becomes more clearly defined. Keep in mind that it’s still experimental, and the official RFC isn’t finalized yet.That said, I’m quite optimistic that we’ll see a solid integration in v20. Until then, you can either rely on self-written extensions or simply use
withProps
as a workaround.