Skip to content

@ngrx/signals: Can a ngrx signal feature store access the state of it's consuming store? #4384

Closed Answered by Donnerstagnacht
Donnerstagnacht asked this question in Q&A
Discussion options

You must be logged in to vote

A direct access seems to be not possible without coupling the stores.

Instead, the ngrx team suggests to use a wrapper function: #4340

Read the full thread here:

A working example with a wrapper function: https://stackblitz.com/edit/ngrx-signal-store-starter-z3q5i5?file=src%2Fmain.ts

A non working example due to coupling:https://stackblitz.com/edit/ngrx-signal-store-starter-23tsna?file=src%2Fmain.ts

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Donnerstagnacht
Comment options

You must be logged in to vote
1 reply
@Donnerstagnacht
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants