Signal Store
A lightweight NgRx state store built on signals.
What is Signal Store?
The NgRx Signal Store is a lighter state management tool built on signals: you define state, computed values and methods in one function.
export const CartStore = signalStore(
withState({ items: [] as Product[] }),
withComputed(({ items }) => ({ count: computed(() => items().length) })),
withMethods(store => ({ add: (p: Product) => patchState(store, { items: [...store.items(), p] }) })),
);
Level: Master · More Angular terms at this level
Updated