Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ngrx/entity

Package Overview
Dependencies
Maintainers
4
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngrx/entity

Common utilities for entity reducers

  • 18.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created

What is @ngrx/entity?

@ngrx/entity is a library for managing collections of entities within an Angular application. It provides a set of methods and utilities to simplify the process of managing entity collections, including CRUD operations, sorting, and filtering.

What are @ngrx/entity's main functionalities?

Entity Adapter

The Entity Adapter is a core feature of @ngrx/entity. It provides methods to manage a collection of entities, including adding, updating, and removing entities.

const adapter = createEntityAdapter<User>();

Selectors

Selectors are used to query the state of the entity collection. @ngrx/entity provides built-in selectors to get all entities, entities as a dictionary, entity IDs, and the total count of entities.

const { selectAll, selectEntities, selectIds, selectTotal } = adapter.getSelectors();

Reducers

Reducers are used to handle actions and update the state. @ngrx/entity provides utility functions to create reducers that can handle adding, updating, and removing entities.

const userReducer = createReducer(initialState, on(addUser, (state, { user }) => adapter.addOne(user, state)));

Other packages similar to @ngrx/entity

Keywords

FAQs

Package last updated on 29 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc