@briebug/ngrx-auto-entity

中文文档
21.1.0发布于 2026/02/06SEE LICENSE IN LICENSE.mdTypeScriptES Module近 30 天下载 2.7万

Automatic Entity State and Facades for NgRx. Simplifying reactive state!

原始使用文档
文档目录3 节
  1. What is it?
  2. Quick Start
  3. Full Usage Documentation

Issues Version Downloads Downloads

NgRX Auto-Entity

Automatic entities for @ngrx! Simplifying reactive state!

What is it?

NgRX Auto-Entity aims to provide a seamless means of dealing with standard entity actions and effects with minimal repetitive code requirements, while preserving the fundamental nature of NgRX itself. This library is not a replacement for or alternative to NgRX. It works within the standard paradigm that NgRX has set forth, making use of actions, reducers & effects like any other NgRX application.

What Auto-Entity does do is provide a set of ready-made actions, selectors, effects & a core metareducer for handling all of the standard CRUD functionality for entities, so you neither have to write nor generate any of that code yourself. Auto-Entity supports implementing applications with recommended best practices, including good action hygiene. Auto-Entity also generates pre-fabricated facades around NgRx and the store/state, providing a cohesive, logical and simplified API into your state for those who prefer facades. Auto-Entity presents a flexible framework that you may use in its entirety for all of your entity needs, or use piecemeal as necessary in order to achieve your specific goals.

While it is not required and Auto-Entity is an entirely independent library that solely depends on Angular and NgRX, Auto-Entity manages state in a manner that is compatible with @ngrx/entity as well, in the event you wish to utilize some of the utilities from that library in your own custom reducers.

Dependencies

NgRx Auto-Entity is compatible with the following versions.

NgRx Auto EntityAngular CoreNgRxRxJs
21.x21.x21.x7.x
20.x20.x20.x7.x
19.x19.x19.x7.x
18.x18.x18.x7.x
17.x17.x17.x7.x
13.x13.x - 16.x13.x - 16.x7.x
12.x12.x12.x6.x

Deps-AngularCore Deps-AngularCommon Deps-NgRxStore Deps-RxJs

Installation

Install @briebug/ngrx-auto-entity from npm:

  • npm install @briebug/ngrx-auto-entity,
  • yarn add @briebug/ngrx-auto-entity, or
  • pnpm add @briebug/ngrx-auto-entity

If you have not already, install the required peer dependencies as well:

  • npm install @ngrx/{effects,store,store-devtools},
  • yarn add @ngrx/{effects,store,store-devtools}, or
  • pnpm add @ngrx/{effects,store,store-devtools}

Quick Start

If you want to get rolling as quickly and simply as possible, you may jump to the quick start guide. (Note: Documentation still in progress!)

Full Usage Documentation

If you wish to learn more about how Auto-Entity works, you may jump to the full usage documentation. (Note: Documentation still in progress!)

Roadmap

  • Initial design of automatic actions
  • Automatic service mapping & lookup
  • Custom criteria
  • Default effects
  • Composite keys
  • Get entity key support on entities
  • Built-in loading indicator tracking
  • Built-in saving indicator tracking
  • Built-in deleting indicator tracking
  • Built-in entity selection support
  • Dynamically generated per-entity actions
  • Dynamically generated per-entity selectors
  • Pre-fabricated facade generation
  • Generated stub reducers
  • Automatic correlation of related initiating and result actions
  • Enhanced IEntityInfo interface with naming utilities
  • Filtering of entities effects handle
  • Custom transformation of data to and from the server (i.e. ISO date to Date())
  • Optional data loading it not already present, with max age
  • Normalization of API with NgRx 8 functional/factory function architecture
  • Dynamic generate-only-on-use design
  • Extended effects for loading indicator display, toasts or snackbars, etc.
  • Filtering of entities meta reducer handles
  • Pre-fabricated, ready-to-go, reusable entity services

Contributors

Follow-BB Follow-BB Follow-BB Follow-BB

版本与发布记录

@briebug/ngrx-auto-entity 共发布 73 个版本,首次发布于 2018/07/26;过去 12 个月发布了 4 个版本。

版本发布日期距今
21.1.0latest2026/02/069 个月前
20.0.0v20-latest2026/02/069 个月前
21.0.02026/01/219 个月前
19.0.02026/01/159 个月前
13.1.02023/07/193 年前
13.0.42023/07/083 年前

其他发布通道:alpha → 0.7.0-alpha.2,beta → 14.0.0-beta.1,v20-latest → 20.0.0。

关于 @briebug/ngrx-auto-entity 的常见问题

@briebug/ngrx-auto-entity 是什么?

Automatic Entity State and Facades for NgRx. Simplifying reactive state!

如何安装 @briebug/ngrx-auto-entity?

在项目目录运行 npm install @briebug/ngrx-auto-entity,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@angular/core(^21.0.0)、@ngrx/effects(^21.0.0)、@ngrx/store(^21.0.0)、rxjs(^7.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@briebug/ngrx-auto-entity 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@briebug/ngrx-auto-entity 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@briebug/ngrx-auto-entity 可以商用吗?

@briebug/ngrx-auto-entity 使用 SEE LICENSE IN LICENSE.md 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@briebug/ngrx-auto-entity 的下载量有多少?

根据 npm 官方下载统计,@briebug/ngrx-auto-entity 在 2026/10/09 – 2026/11/07 这 30 天内被下载 27,076 次,日均约 903 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@briebug/ngrx-auto-entity 还在维护吗?

最新版本 21.1.0 发布于 2026/02/06(9 个月前);至今共发布 73 个版本,其中过去 12 个月发布了 4 个;首次发布于 2018/07/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。