Skip to the content.

@redux-multipurpose/core

Installation

Redux Multipurpose core is available as a package on NPM:

npm install @redux-multipurpose/core

Purpose

The Redux Multipurpose core package is intended to:

The store can be initialized simply with an initializeStore(), and then imported and used including the instance store. The initialization is based on @reduxjs/toolkit configureStore method. Please refer to its documentation about reducers, enhancers, middlewares, preloaded state and dev tools configurations.

Store

Redux Multipurpose store includes these APIs:

Included redux packages:

Here the list of included redux packages. Please refer to their own documentations to customize their in app integration.

Enhancements

Under this section will be described enhanced functionalities of Redux Multipurpose store

Decorators

Similar to some @angular-redux/store decorators, Redux multipurpose let the developer to use these decorators:

Router reducer

As @angular-redux, the initializeStore method lets to initialize a routing reducer to track navigation changes, and to dispatch a page change event.

The object to be passed to router variable of initializeStore needs these parameters:

An implementation is provided with @redux-multipurpose/angular-router package, only suitable for angular applications.

Other utilities

The utils directory contains some store utilities that can be used on store common substates configurations.

ws utils let the developer to easily create and configure a web service wrapper substate. It provides these methods:

persist utils let the developer to easily create a reducer relative to a substate that will be persisted by redux-persist. It provides: