Skip to content

Commit 4754aa8

Browse files
authored
Merge branch 'main' into wolfmanfx/issue236
2 parents 735c6b0 + def1b93 commit 4754aa8

10 files changed

Lines changed: 585 additions & 20 deletions

File tree

apps/demo/src/app/counter-rx-mutation/counter-rx-mutation.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ export type CounterResponse = {
1616
json: { counter: number };
1717
};
1818

19+
// TODO - rename this file to just be `mutations-functions-standalone` + class/selector etc??
20+
// And then the other folder to "store"
21+
// Or maybe put these all in one folder too while we are at it?
1922
@Component({
2023
selector: 'demo-counter-rx-mutation',
2124
imports: [CommonModule],

apps/demo/src/app/devtools/todo-store.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@ export const TodoStore = signalStore(
3030
},
3131

3232
remove(id: number) {
33-
updateState(store, 'remove todo', removeEntity(id));
33+
updateState(
34+
store,
35+
'remove todo',
36+
removeEntity(id),
37+
({ selectedIds }) => ({
38+
selectedIds: selectedIds.filter((selectedId) => selectedId !== id),
39+
}),
40+
);
3441
},
3542

3643
toggleFinished(id: number): void {

docs/docs/extensions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ It offers extensions like:
1313
- [~Redux~](./with-redux): Possibility to use the Redux Pattern. Deprecated in favor of NgRx's `@ngrx/signals/events` starting in 19.2
1414
- [Resource](./with-resource): Integrates Angular's Resource into SignalStore for async data operations
1515
- [Entity Resources](./with-entity-resources): Builds on top of [withResource](./with-resource); adds entity support for array resources (`ids`, `entityMap`, `entities`)
16+
- [Mutations](./mutations): Seek to offer an appropriate equivalent to signal resources for sending data back to the backend
1617
- [Reset](./with-reset): Adds a `resetState` method to your store
1718
- [Call State](./with-call-state): Add call state management to your signal stores
1819
- [Storage Sync](./with-storage-sync): Synchronizes the Store with Web Storage

0 commit comments

Comments
 (0)