-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Enhance withCallState to Support Multiple Collections #147
Comments
The upcoming Would do you say? |
I agree that the Resource API will address some of these issues. However, I’m unsure about its adoption in existing projects. For new development, it makes sense to use the Resource API, but migrating large-scale projects to these new APIs will take time. In the meantime, since this feature is already available in the @angular-architects/ngrx-toolkit, I’m happy to enhance it further to improve its usability. |
OK, but then please do the following before making a PR:
|
Sure. I think the medium post I shared already has pretty much everything explain. |
Here's a working example link to the idx-project: Let me know your Gmail address, and I’ll add you as a collaborator. |
We should discuss the design here. you can provide code examples where you show how the changes to the API should look like from the user's perspective. |
@rainerhahnekamp I have updated the PR I have tested this edited Thanks |
Feature Request: Enhance withCallState from @angular-architects/ngrx-toolkit to Support Multiple Collections and make a part of core @ngrx/signals package
Issue
Currently, withCallState only accepts a collection with a single string value. However, in large projects, we often need to track the loading state of multiple collections simultaneously.
While it's possible to use multiple withCallState functions, this approach has a significant drawback: the Store currently accepts only 15 inputs. Using withCallState multiple times can quickly reach this limit, making state management inefficient.
Proposed Solution
Extend withCallState to accept an array of strings, allowing developers to manage the state of multiple collections more effectively.
I've already implemented a similar feature in a custom store and shared my approach in this Medium article.
I believe integrating this functionality into the core @ngrx/signals package (instead of relying on @angular-architects/ngrx-toolkit) would be highly beneficial for developers working with complex state management scenarios.
Appreciation
Thanks for all the great work you do @ngrx-toolkit! Looking forward to your thoughts on this.
Related issue already posted on @ngrx/platform
The text was updated successfully, but these errors were encountered: