Socket
Socket
Sign inDemoInstall

@ngrx/entity

Package Overview
Dependencies
Maintainers
4
Versions
123
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


Version published
Weekly downloads
302K
increased by0.88%
Maintainers
4
Weekly downloads
 
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 03 Oct 2023

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