Skip to content
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

feat(signals): add upsert entity updaters #4727

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

markostanimirovic
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

upsertEntity

Adds or updates an entity in the collection.
When updating, it does not replace the existing entity but merges it with the provided one.

patchState(store, upsertEntity(todo));

upsertEntities

Adds or updates multiple entities in the collection.
When updating, it does not replace existing entities but merges them with the provided ones.

patchState(store, upsertEntities([todo1, todo2]));

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Copy link

netlify bot commented Mar 21, 2025

Deploy Preview for ngrx-io ready!

Name Link
🔨 Latest commit a68ab2a
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/67dcb374bd4e960008fa5cd0
😎 Deploy Preview https://deploy-preview-4727--ngrx-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant