Skip to content

Conceptual Question NGRX Signal store - Many small features vs. few big features? #4545

Discussion options

You must be logged in to vote

I can only give you my opinion but exceeding 16 indicates that your store is too large. If the same store is required in any component/service which is sending a request, that's the wrong approach.

Split your store into multiple pieces. You will have some state which applies to only a component/component tree. That would be a component provided state, which you can also provide in root, if you want your state stays alive.

For state which is used application-wide, go with root provided state.

If your application heavily depends on eventing, you might also consider to use Redux, which means the extension of the toolkit or the global store.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@PhilippMDoerner
Comment options

@rainerhahnekamp
Comment options

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