@salsita/react-entities

1.0.0 • Public • Published

react-entities

Install

Install this package with npm

npm i @salsita/react-entities

or yarn

yarn add @salsita/react-entities

API

Modules

EntitiesActions

Functions

entitiesReducer(state, action)EntitiesState

The reducer of the entities module

normalizeAndStore(data, schema)String | Number | Array

Normalize and store data into the entity repository

Normalizes data according to the schema and stores the result into the entity repository.

EntitiesActions

EntitiesActions.repositoryHasChanged(repository) ⇒ Action

Modifies entity repository

Kind: static method of EntitiesActions

Param Type Description
repository Partial.<EntitiesState> Entities that will be merged into the entity repository

entitiesReducer(state, action) ⇒ EntitiesState

The reducer of the entities module

Kind: global function

Param Type Description
state EntitiesState The state of the entities module
action Action A redux action

normalizeAndStore(data, schema) ⇒ String | Number | Array

Normalize and store data into the entity repository

Normalizes data according to the schema and stores the result into the entity repository.

Kind: global function
Returns: String | Number | Array - Returns either ID or list of IDs of normalized data

Param Type Description
data Object | Array Entity or list of entities
schema Object | Array Normalizr schema

Readme

Keywords

none

Package Sidebar

Install

npm i @salsita/react-entities

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

7.37 kB

Total Files

8

Last publish

Collaborators