Angular Best Practices Signalstore

alfredoperez/angular-best-practices/skills/angular-best-practices-signalstore

作者 alfredopereza499a4786182097a500dd2fb6ddc2489caee3854MIT37 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫6 個月前更新

NgRx SignalStore best practices for Angular. Covers shared state, computed state, entity management, and RxJS integration with rxMethod. Activates when working with @ngrx/signals and @ngrx/signals/entities. Do not use for NgRx Store or class-based state services. Install alongside angular-best-practices for full coverage.

已封存僅含說明Software Development
AI 產生的概覽

針對 Angular 的 NgRx SignalStore 最佳實務指南,涵蓋共享狀態、計算狀態、實體管理與 RxJS 整合。

功能
此技能提供在 Angular 應用程式中使用 NgRx SignalStore 的最佳實務規則。內容涵蓋以訊號為基礎的共享狀態、透過 withComputed 衍生的狀態、使用 withEntities 管理集合,以及透過 rxMethod 整合 RxJS 副作用。它是僅含說明的附加技能,需與核心 Angular 最佳實務技能一同安裝。
適用情境
適用於建立或修改以 SignalStore 為基礎的狀態管理、使用 rxMethod 整合 RxJS 副作用,或使用 withEntities 管理集合的情境。不適用於 NgRx Store 或以類別為基礎的狀態服務。
執行需求
無需指令碼或工具,僅為說明性技能文件。假定專案為使用 @ngrx/signals 與 @ngrx/signals/entities 的 Angular 專案,並設計為與核心 angular-best-practices 技能一同安裝。

Angular SignalStore Best Practices

NgRx SignalStore rules for signal-based local and feature state management. Use with the core angular-best-practices skill for comprehensive Angular coverage.

Links

When to Apply

  • Creating or modifying SignalStore-based state management
  • Integrating RxJS side effects with rxMethod
  • Managing collections with withEntities

Rules

RuleImpactDescription
Use rxMethod for RxJS IntegrationMEDIUMDebounce, switchMap, and other RxJS operators in stores
Use SignalStore for Shared StateHIGHSignal-based reactivity without full NgRx overhead
Use withComputed for Derived StateMEDIUMCentralized memoized derivation logic
Use withEntities for CollectionsMEDIUMO(1) lookups and standardized CRUD operations

Install

Install from skills.sh/alfredoperez/angular-best-practices:

來源與署名

來源:alfredoperez/angular-best-practices位於skills/angular-best-practices-signalstore提交a499a47

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架