@ngrx/signals: How can I access the state of a featureStore which is consumed in a prefixed featureStore? #4386
Replies: 2 comments
-
What exactly does not work in your example? If I click on the the three buttons they show copied as probably intended and switch back after some time. |
Beta Was this translation helpful? Give feedback.
-
It is not about a button. I just took over the example. I have a store which consumes a feature store which consumed a feature store: For example: Step 1: a feature store
Step 2: This loadingStore is consumed by a non prefixed store:
Step 3: And this non prefixed store is consumed by a main store, then the main store can access the properties from all nested stores (like loading):
But this chain is not working if one of the stores is a prefixed store. Why is that? Is there a workarround? Can I prefix my nested stores and type that? I updated my stackblitz: https://stackblitz.com/edit/stackblitz-starters-oncrwa?file=src%2Fwith-clipboard.ts,src%2Fmain.store.ts,src%2Fmain.ts,src%2Ftsconfig.app.json |
Beta Was this translation helpful? Give feedback.
-
How can I access the state of a featureStore which is consumed in a prefixed featureStore?
I followed the example from this page (https://www.stefanos-lignos.dev/posts/ngrx-signals-store). But when I add a featureStore to the prefixed feature store, I can not access the state of the added featureStore.
I forked the mentioned example and added a "loadingFeatureStore", but as said, I can not use it. Do I have to change my types?
https://stackblitz.com/edit/stackblitz-starters-oncrwa?file=src%2Fwith-clipboard.ts
Also created a stackoverflow question:
https://stackoverflow.com/questions/78608997/ngrx-signals-how-can-i-access-the-state-of-a-featurestore-which-is-consumed-in
Beta Was this translation helpful? Give feedback.
All reactions