Registry / devops / redux-orm-angular

redux-orm-angular

JSON →
library2.0.0jsnpmunverified

Helpers for integrating Angular applications using angular-redux with redux-orm. Version 2.0.0 is the current stable release. It provides an observable-based query mechanism (selectData) to subscribe to redux-ORM queries directly in Angular components via the @select decorator. Alternative to manually wiring up redux-ORM sessions; requires redux-orm ^0.9.0 as peer dependency. Ships TypeScript types. Low maintenance cadence.

npm install redux-orm-angular
INSTALL
IMPORT
SIG · REDUX-ORM-ANGULAR
R
redux-orm-angular
devopsjavascriptv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

selectData
import { selectData } from 'redux-orm-angular'
const selectData = require('redux-orm-angular').selectData; // CJS require works but ESM preferred
CommonJS require is supported but TypeScript/ESM import is recommended. This is the primary exported function.

Configures ORM.angularConfig and uses selectData in an Angular component to subscribe to all Post entities.

// Install dependencies // npm install --save redux-orm-angular redux-orm @angular-redux/store import { ORM } from 'redux-orm'; import { Post } from './models/post'; const orm = new ORM(); orm.register(Post); // Required configuration ORM.angularConfig = { instance: orm, stateKey: 'data' }; // In Angular component import { Component } from '@angular/core'; import { selectData } from 'redux-orm-angular'; import { Observable } from 'rxjs'; import { Post } from './models/post'; // assumes model is registered @Component({ selector: 'app-root', template: `<div *ngFor="let post of posts$ | async">{{ post.title }}</div>` }) export class AppComponent { @select(selectData(Post).all()) posts$!: Observable<typeof Post[]>; }
Debug
Known issues
gotchaORM.angularConfig must be set before any component using selectData is instantiated. Forgetting this causes a runtime error.
fix
Set ORM.angularConfig as shown in the README configuration section.
affects: >=1.0.0
breakingRequires redux-orm ^0.9.0. Using a different version may cause breaking changes.
fix
Ensure redux-orm version is ^0.9.0 in package.json.
affects: 2.0.0
deprecatedPackage relies on angular-redux/store which is no longer maintained (Angular 9+). Consider migrating to @ngrx/store or similar.
fix
Use modern Angular state management like @ngrx/store with redux-orm directly.
affects: >=1.0.0
gotchaselectData returns a function that must be used with @select or the select() function from angular-redux. Not usable with other state management libraries.
fix
Use only with angular-redux/store patterns.
affects: >=1.0.0
gotchaThe stateKey in ORM.angularConfig must match the key where the redux-orm reducer is mounted in the Redux store. Mismatch leads to empty data.
fix
Ensure stateKey equals the key in combineReducers used for the redux-orm reducer.
affects: >=1.0.0
Errors
Common errors & fixes
Error: ORM.angularConfig is not set
ORM.angularConfig was not defined before using selectData.
fix
Define ORM.angularConfig with instance and stateKey as per the configuration section.
TypeError: Cannot read property 'stateKey' of undefined
ORM.angularConfig is undefined or missing stateKey.
fix
Set ORM.angularConfig = { instance: orm, stateKey: 'your_key' }.
Error: Session not found for model <ModelName>
Model not registered in the ORM instance used in ORM.angularConfig.instance.
fix
Register the model on the orm instance: orm.register(ModelName).
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
redux-ormrequiredPeer dependency; provides ORM core
Agent activity
4 hits · last 30 days
node
4
Resources
redux-orm-angular — npm install redux-orm-angular · libregistry