Skip to content

Is it possible to pass full store to signalStoreFeature when using withFeature()? #4756

Answered by rainerhahnekamp
gkyildirim asked this question in Q&A
Discussion options

You must be logged in to vote

If the argument of withTopLevelMethods matches your store, you can do it. But withFeature is more relevant when you are features are decoupled from the actual store and you need to do some mapping between the properties or methods.

If withTopLevelMethods, on the other side, matches already the partial state, you can also go directly with the input constraints: https://ngrx.io/guide/signals/signal-store/custom-store-features#creating-a-custom-feature-with-input

Replies: 1 comment 1 reply

Comment options

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

Answer selected by gkyildirim
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