# @acoustic-content-sdk/redux-store

> Implementation of a Redux store with support for adding feature modules, dynamically.

Latest version **9.0.10076** (published 2020-03-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @acoustic-content-sdk/redux-store
pnpm add @acoustic-content-sdk/redux-store
yarn add @acoustic-content-sdk/redux-store
bun add @acoustic-content-sdk/redux-store
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 9.0.10076 |
| Published | 2020-03-26 |
| First published | 2019-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 378.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Carsten Leue |
| Maintainers | carstenleue, daherbst, jim.patrick, joe.john, kevintap, mburati, neelkanthpatel, orenaksakal |
| Keywords | acoustic, acoustic-content, redux, sdk |

## Links

- npm: https://www.npmjs.com/package/@acoustic-content-sdk/redux-store
- npm.io page: https://npm.io/package/@acoustic-content-sdk/redux-store

## Dependencies (2)

- [@acoustic-content-sdk/api](https://npm.io/package/@acoustic-content-sdk/api.md) 9.0.10076
- [@acoustic-content-sdk/utils](https://npm.io/package/@acoustic-content-sdk/utils.md) 9.0.10076

## Recent versions

- 9.0.10076 (latest) — 2020-03-26
- 9.0.29 (beta) — 2020-01-09
- 9.0.10067 — 2020-03-25
- 9.0.10040 — 2020-03-20
- 9.0.10034 — 2020-03-20
- 9.0.495 — 2020-03-09
- 9.0.493 — 2020-03-08
- 9.0.462 — 2020-03-05
- 9.0.407 — 2020-02-28
- 9.0.384 — 2020-02-25
- 9.0.361 — 2020-02-21
- 9.0.360 — 2020-02-21
- 9.0.271 — 2020-02-11
- 9.0.251 — 2020-02-07
- 9.0.242 — 2020-02-06
- … 11 more at https://npm.io/package/@acoustic-content-sdk/redux-store/versions

## README

<a name="_8ff4203d8055d6e223cc15b051f2e22a2f91e10a6ceba8508a9aa1a1316f5d49"></a>
[![npm](https://img.shields.io/npm/v/@acoustic-content-sdk/redux-store.svg?style=flat-square)](https://www.npmjs.com/package/@acoustic-content-sdk/redux-store)

Implementation of a [Redux](https://redux.js.org/api/store) store with support for adding feature modules, dynamically.

## Providing a feature module

Create and export an instance of `ReduxFeatureModule` for your module.

### Example

```typescript
import {
  ReduxFeatureModule,
  createReduxFeatureModule
} from '@acoustic-content-sdk/redux-store';

import { sampleEpic } from './feature.epics';
import { sampleReducer } from './feature.reducer';
import { SampleFeatureState } from './feature.state';

export const sampleFeature = createReduxFeatureModule(
  'SAMPLE_FEATURE',
  sampleReducer,
  sampleEpic
);
```

In some cases a feature module depends on the existence on other feature modules, e.g. because an [epic](https://redux-observable.js.org/docs/basics/Epics.html) might require it. In this case list the modules the feature modules depends on in the `dependencies` parameter:

```typescript
import {
  ReduxFeatureModule,
  createReduxFeatureModule
} from '@acoustic-content-sdk/redux-store';

import { sampleEpic } from './feature.epics';
import { sampleReducer } from './feature.reducer';
import { SampleFeatureState } from './feature.state';

export const sampleFeature = createReduxFeatureModule(
  'SAMPLE_FEATURE',
  sampleReducer,
  sampleEpic,
  [depModule1, depModule2, depModule3]
);
```

## Registering a feature module

Register the feature module with the root store using the `addFeatureModule` method. This will also register all dependent modules in topology order.

```typescript
import {
  ReduxRootStore
} from '@acoustic-content-sdk/redux-store';

const store: ReduxRootStore = ...;

store.addFeatureModule(sampleFeature);
```

## Consuming a feature module

Use the `selectFeature` method to create a selector for the desired feature.

### Example

```typescript
import { selectFeature } from '@acoustic-content-sdk/redux-store';

const selectSample = selectFeature(sampleFeature);
```

## Side effects in Feature Modules

Feature modules may provide side effects ([Epics](https://redux-observable.js.org/docs/basics/Epics.html)) for asynchronous processing. Sometimes such epics require an initialization event to execute bootstrapping logic. The store sends an initialization event for this purpose, after a feature module has been initialized. Use the `ofInitFeature` method to subscribe to this event.

### Example

```typescript
import { ofInitFeature } from '@acoustic-content-sdk/redux-store';

const initEpic: Epic = (actions$) =>
  actions$.pipe(ofInitFeature(sampleFeature), map(...));
```

## API Documentation

[API Documentation](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d)

<a name="_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d)

## redux-store package

Implementation of a [Redux](https://redux.js.org/api/store) store with support for adding feature modules, dynamically.

## Functions

|  Function | Description |
|  --- | --- |
|  [createIdentifier(idOrModuleId, aValue)](#_177ecbe949f574e49310fca9b32925d00d07c263ba6ce2ba8e74cb5e687cc520) | Scopes the given ID with a feature prefix to make it unique |
|  [createReduxFeatureModule(idOrModuleId, reducer, epic, dependencies)](#_cf14d94439f3cb5312f969754c3d33754cef60ea232881a64b5b93f35c723f2d) | Convenience method to create a feature module |
|  [createReduxMetaModule(dependencies)](#_34cf623976d88d67bc5293cac9f3e89b41655e079414f71d9c5aaf2c3f171e85) | Convenience method to create a meta module, i.e. a module that bundles other modules |
|  [createReduxRootStore(aDependencies, aPreLoadedState)](#_66f61f3e1236868e34069de0a3ebd71fa543baf4d52093bfe751853224c480cd) | Constructs a new store that can handle feature modules. |
|  [featureModuleId(id)](#_9b52b9bd6968d8c21ea68917a8fbc49eb3d1a4077686b38e2543c6a161e6b90e) | Constructs a feature module ID that carries type information |
|  [ofInitFeature(idOrModuleId)](#_ba9e3ea18cc067914b848de12508b18f720d39e70d2e1b634b68cd16d8e8dda6) | Returns an operator function that filters the initialization actions for a particular feature. This is typically used in feature epics. Since we know that an initialization can occur at most once, the operator also terminates automatically after the first emission. |
|  [rxSelectFeature(idOrModuleId)](#_806689026e73a916dfa202e35dc7e0f7c182629bcf6ce69db19485b035ffaa88) | Returns a selector that selects the given feature from the store and returns an observable to that feature state. |
|  [rxStore(aStore)](#_d03660d793d99f24b4fb32394ad65e08e458a891bfea56e6a5cabafab34d8a1f) | Exposes the store as an [Observable](https://rxjs.dev/api/index/class/Observable)<!-- -->. |

## Interfaces

|  Interface | Description |
|  --- | --- |
|  [PayloadAction](#_1e65cd38089e5b953fa42c6fd70761d88562bada790f6ecdbfb179c297b431e4) | Base class for actions that carry a payload. Use the [selectPayload](#_59b796eb9c39eb901bec169ba51dcc68804ad582e472388fd6c5e90284c40f05) method to extract the payload. |
|  [ReduxFeatureModule](#_a3e535780ec6785ecd4e6c17b644cd4b35d693fa0c91948d0de138bae3abc8ef) | Defines the feature module. The ID identifies the section in the state and is also used to globally discriminate features.<!-- -->After instantiating a feature store the store will fire an initialization action for that feature. Use [ofInitFeature()](#_ba9e3ea18cc067914b848de12508b18f720d39e70d2e1b634b68cd16d8e8dda6) to register for these initialization actions. |
|  [ReduxFeatureModuleId](#_056eef027d0da2be8587371334e3c7def8b7e888d5ac5ccb0cf604ba4afe2d56) | Feature module identifier. This wrapper around an ID is useful, because it carries type information. |
|  [ReduxRootStore](#_6aeba4bbbe96bcaa0ca644e1f854a0a66aacd39e07855331aca46a194a09b60f) | Implementation of a store that manages sub-state as features. Features are added to the store automatically, when required by the select method. |
|  [ReduxRootStoreDependencies](#_564fe347012524fb390d10b1a134baf940fc65a1617da8ecbc2676312561ef54) | Dependencies object available for epics |

## Variables

|  Variable | Description |
|  --- | --- |
|  [rxDispatch](#_5d6e1948299a3fd2e795720ee82d80b165f9a8fbf0514bd4de8ac25adae60423) | Binds the dispatch method |
|  [rxSelect](#_f080fb6d21d915e076ad16c4eb10b42cdc5f60d21983b00ddb34d5093c4bf897) | Exposes a memoized selector function |
|  [selectFeature](#_8c881d33af7999eefd88a320c2f7659b46e80248876aa4be6c9354db696232c3) | Returns a selector that selects the given feature |
|  [selectPayload](#_59b796eb9c39eb901bec169ba51dcc68804ad582e472388fd6c5e90284c40f05) | Selects the payload from a [PayloadAction](#_1e65cd38089e5b953fa42c6fd70761d88562bada790f6ecdbfb179c297b431e4) instance |
|  [STORE\_ID](#_938bfa184eebde4d5de9ec2479e82379ad25a5405996b6592769df9190bb32a2) | Exposes the namespace of this store. This constant can e.g. be used to prefix actions. |
|  [VERSION](#_671d116557d9764b8b342ef441e4088063d7517284c0b07649f83285cd4b6757) | Version and build number of the package |

## Type Aliases

|  Type Alias | Description |
|  --- | --- |
|  [ReduxRootState](#_97d493d60fcbe130b9869a39e7b72a09836d488debcc8a1e6c6829862e81ddbc) | Root state for the reducer, this is a mapping from feature ID to feature. |


<a name="_8ff4203d8055d6e223cc15b051f2e22a2f91e10a6ceba8508a9aa1a1316f5d49"></a>

<a name="_177ecbe949f574e49310fca9b32925d00d07c263ba6ce2ba8e74cb5e687cc520"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [createIdentifier](#_177ecbe949f574e49310fca9b32925d00d07c263ba6ce2ba8e74cb5e687cc520)

## createIdentifier() function

Scopes the given ID with a feature prefix to make it unique

<b>Signature:</b>

```typescript
export declare function createIdentifier(idOrModuleId: string | ReduxFeatureModuleId<any, any>, aValue?: string): string;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  idOrModuleId | <code>string &#124; ReduxFeatureModuleId&lt;any, any&gt;</code> | the module |
|  aValue | <code>string</code> | optionally a identifier, will create a random identifier otherwise |

<b>Returns:</b>

`string`

the new identifier


<a name="_cf14d94439f3cb5312f969754c3d33754cef60ea232881a64b5b93f35c723f2d"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [createReduxFeatureModule](#_cf14d94439f3cb5312f969754c3d33754cef60ea232881a64b5b93f35c723f2d)

## createReduxFeatureModule() function

Convenience method to create a feature module

<b>Signature:</b>

```typescript
export declare function createReduxFeatureModule<S, FS = any, Input extends Action = AnyAction, Output extends Input = Input, Dependencies = any>(idOrModuleId?: string | ReduxFeatureModuleId<S, FS>, reducer?: Reducer<S>, epic?: Epic<Input, Output, ReduxRootState, Dependencies>, dependencies?: ArrayLike<ReduxFeatureModule<any>>): ReduxFeatureModule<S, FS>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  idOrModuleId | <code>string &#124; ReduxFeatureModuleId&lt;S, FS&gt;</code> | ID of the store, if not set, generate a random identifier |
|  reducer | <code>Reducer&lt;S&gt;</code> | optionally the reducer |
|  epic | <code>Epic&lt;Input, Output, ReduxRootState, Dependencies&gt;</code> | optionally the epic |
|  dependencies | <code>ArrayLike&lt;ReduxFeatureModule&lt;any&gt;&gt;</code> | optionally the dependencies on other modules |

<b>Returns:</b>

`ReduxFeatureModule<S, FS>`

a [ReduxFeatureModule](#_a3e535780ec6785ecd4e6c17b644cd4b35d693fa0c91948d0de138bae3abc8ef) instance


<a name="_34cf623976d88d67bc5293cac9f3e89b41655e079414f71d9c5aaf2c3f171e85"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [createReduxMetaModule](#_34cf623976d88d67bc5293cac9f3e89b41655e079414f71d9c5aaf2c3f171e85)

## createReduxMetaModule() function

Convenience method to create a meta module, i.e. a module that bundles other modules

<b>Signature:</b>

```typescript
export declare function createReduxMetaModule<FS = any>(dependencies: ArrayLike<ReduxFeatureModule<any>>): ReduxFeatureModule<any, FS>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  dependencies | <code>ArrayLike&lt;ReduxFeatureModule&lt;any&gt;&gt;</code> | dependencies on other modules |

<b>Returns:</b>

`ReduxFeatureModule<any, FS>`

a [ReduxFeatureModule](#_a3e535780ec6785ecd4e6c17b644cd4b35d693fa0c91948d0de138bae3abc8ef) instance


<a name="_66f61f3e1236868e34069de0a3ebd71fa543baf4d52093bfe751853224c480cd"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [createReduxRootStore](#_66f61f3e1236868e34069de0a3ebd71fa543baf4d52093bfe751853224c480cd)

## createReduxRootStore() function

Constructs a new store that can handle feature modules.

<b>Signature:</b>

```typescript
export declare function createReduxRootStore(aDependencies: any, aPreLoadedState?: ReduxRootState): ReduxRootStore;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  aDependencies | <code>any</code> | the dependencies that will be injected into the epics |
|  aPreLoadedState | <code>ReduxRootState</code> | optionally an initial state object |

<b>Returns:</b>

`ReduxRootStore`

the store. Use the [ReduxRootStore.addFeatureModule()](#_a6af75b7504a0a00d017a0b16aa754cbeab0e22cddecae71683ff892ab6148d8) method to register a feature module.


<a name="_9b52b9bd6968d8c21ea68917a8fbc49eb3d1a4077686b38e2543c6a161e6b90e"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [featureModuleId](#_9b52b9bd6968d8c21ea68917a8fbc49eb3d1a4077686b38e2543c6a161e6b90e)

## featureModuleId() function

Constructs a feature module ID that carries type information

<b>Signature:</b>

```typescript
export declare function featureModuleId<S, FS = any>(id?: string): ReduxFeatureModuleId<S, FS>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  id | <code>string</code> | the module identifier or empty to create a random identifier |

<b>Returns:</b>

`ReduxFeatureModuleId<S, FS>`

the ID


<a name="_ba9e3ea18cc067914b848de12508b18f720d39e70d2e1b634b68cd16d8e8dda6"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ofInitFeature](#_ba9e3ea18cc067914b848de12508b18f720d39e70d2e1b634b68cd16d8e8dda6)

## ofInitFeature() function

Returns an operator function that filters the initialization actions for a particular feature. This is typically used in feature epics. Since we know that an initialization can occur at most once, the operator also terminates automatically after the first emission.

<b>Signature:</b>

```typescript
export declare function ofInitFeature<A = AnyAction>(idOrModuleId: string | ReduxFeatureModuleId<any, any>): OperatorFunction<A, string>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  idOrModuleId | <code>string &#124; ReduxFeatureModuleId&lt;any, any&gt;</code> | the feature ID to filter for |

<b>Returns:</b>

`OperatorFunction<A, string>`

the operator function that filters for the initialization action and resolves to the ID of the feature


<a name="_806689026e73a916dfa202e35dc7e0f7c182629bcf6ce69db19485b035ffaa88"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [rxSelectFeature](#_806689026e73a916dfa202e35dc7e0f7c182629bcf6ce69db19485b035ffaa88)

## rxSelectFeature() function

Returns a selector that selects the given feature from the store and returns an observable to that feature state.

<b>Signature:</b>

```typescript
export declare function rxSelectFeature<S, FS = any>(idOrModuleId: string | ReduxFeatureModuleId<S, FS>): UnaryFunction<ReduxRootStore, Observable<S>>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  idOrModuleId | <code>string &#124; ReduxFeatureModuleId&lt;S, FS&gt;</code> | ID of the module |

<b>Returns:</b>

`UnaryFunction<ReduxRootStore, Observable<S>>`

an observable with the feature selected


<a name="_d03660d793d99f24b4fb32394ad65e08e458a891bfea56e6a5cabafab34d8a1f"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [rxStore](#_d03660d793d99f24b4fb32394ad65e08e458a891bfea56e6a5cabafab34d8a1f)

## rxStore() function

Exposes the store as an [Observable](https://rxjs.dev/api/index/class/Observable)<!-- -->.

<b>Signature:</b>

```typescript
export declare function rxStore<S>(aStore: Store<S>): Observable<S>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  aStore | <code>Store&lt;S&gt;</code> | the store |

<b>Returns:</b>

`Observable<S>`

the store as an [Observable](https://rxjs.dev/api/index/class/Observable)


<a name="_1e65cd38089e5b953fa42c6fd70761d88562bada790f6ecdbfb179c297b431e4"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [PayloadAction](#_1e65cd38089e5b953fa42c6fd70761d88562bada790f6ecdbfb179c297b431e4)

## PayloadAction interface

Base class for actions that carry a payload. Use the [selectPayload](#_59b796eb9c39eb901bec169ba51dcc68804ad582e472388fd6c5e90284c40f05) method to extract the payload.

<b>Signature:</b>

```typescript
export interface PayloadAction<T> extends Action 
```

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [payload](#_5e60697365d38c2e7e4880c2d2d82fb5361bf7e7a50d91bd023646d810ca04b2) | <code>T</code> |  |


<a name="_59b796eb9c39eb901bec169ba51dcc68804ad582e472388fd6c5e90284c40f05"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [selectPayload](#_59b796eb9c39eb901bec169ba51dcc68804ad582e472388fd6c5e90284c40f05)

## selectPayload variable

Selects the payload from a [PayloadAction](#_1e65cd38089e5b953fa42c6fd70761d88562bada790f6ecdbfb179c297b431e4) instance

<b>Signature:</b>

```typescript
selectPayload: <T>(aAction: PayloadAction<T>) => T
```

<a name="_a3e535780ec6785ecd4e6c17b644cd4b35d693fa0c91948d0de138bae3abc8ef"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxFeatureModule](#_a3e535780ec6785ecd4e6c17b644cd4b35d693fa0c91948d0de138bae3abc8ef)

## ReduxFeatureModule interface

Defines the feature module. The ID identifies the section in the state and is also used to globally discriminate features.

After instantiating a feature store the store will fire an initialization action for that feature. Use [ofInitFeature()](#_ba9e3ea18cc067914b848de12508b18f720d39e70d2e1b634b68cd16d8e8dda6) to register for these initialization actions.

<b>Signature:</b>

```typescript
export interface ReduxFeatureModule<S, FS = any, Input extends Action = AnyAction, Output extends Input = Input, Dependencies = any> extends ReduxFeatureModuleId<S, FS> 
```

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [dependencies](#_3516fec258a78cb5676f5ba9bec45972f963910d90eb0f28de6164f1a92367e8) | <code>ArrayLike&lt;ReduxFeatureModule&lt;any&gt;&gt;</code> | Dependencies on other modules |
|  [epic](#_deb7a93db1cd5a6c70f7f0091d40092ca90229b4412d418d5da3f8cbd0886e43) | <code>Epic&lt;Input, Output, ReduxRootState, Dependencies&gt;</code> | The epic for side effects |
|  [id](#_2cc604915409469dcf5a79725b6338eaa5aa15a44374e42d9d909d5050afc529) | <code>string</code> | ID of the feature module, will also be used as the key to the state |
|  [reducer](#_ba04dcd50701dc6bcf9547735c6ad17f7fd3bbdf7de9c73eb8ceb2bb70378c03) | <code>Reducer&lt;S&gt;</code> | The reducer for the module. |


<a name="_056eef027d0da2be8587371334e3c7def8b7e888d5ac5ccb0cf604ba4afe2d56"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxFeatureModuleId](#_056eef027d0da2be8587371334e3c7def8b7e888d5ac5ccb0cf604ba4afe2d56)

## ReduxFeatureModuleId interface

Feature module identifier. This wrapper around an ID is useful, because it carries type information.

<b>Signature:</b>

```typescript
export interface ReduxFeatureModuleId<S, FS = any> 
```

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [id](#_ee1b7128b9a49b077bdf32e67dceb833021b5d9b74530393b5690a81358590b3) | <code>string</code> | ID of the feature module, will also be used as the key to the state |


<a name="_6aeba4bbbe96bcaa0ca644e1f854a0a66aacd39e07855331aca46a194a09b60f"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxRootStore](#_6aeba4bbbe96bcaa0ca644e1f854a0a66aacd39e07855331aca46a194a09b60f)

## ReduxRootStore interface

Implementation of a store that manages sub-state as features. Features are added to the store automatically, when required by the select method.

<b>Signature:</b>

```typescript
export interface ReduxRootStore<S = ReduxRootState, A extends Action = AnyAction> extends Store<S, A> 
```

## Methods

|  Method | Description |
|  --- | --- |
|  [addFeatureModule(aFeature)](#_a6af75b7504a0a00d017a0b16aa754cbeab0e22cddecae71683ff892ab6148d8) | Registers a feature module with the root store |


<a name="_564fe347012524fb390d10b1a134baf940fc65a1617da8ecbc2676312561ef54"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxRootStoreDependencies](#_564fe347012524fb390d10b1a134baf940fc65a1617da8ecbc2676312561ef54)

## ReduxRootStoreDependencies interface

Dependencies object available for epics

<b>Signature:</b>

```typescript
export interface ReduxRootStoreDependencies 
```

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [logSvc](#_a9e1ee10862fe82d439a32e7f66d6442d140e16b73d3c4b02698c917771d8907) | <code>LoggerService</code> | Service that allows to create logger instances |
|  [rootStore](#_3769e3fb6c382a3b7a4805df0bad7bc49f70dd3a5768edfe59afa3c1af893724) | <code>ReduxRootStore</code> | The root store dependencies |


<a name="_5d6e1948299a3fd2e795720ee82d80b165f9a8fbf0514bd4de8ac25adae60423"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [rxDispatch](#_5d6e1948299a3fd2e795720ee82d80b165f9a8fbf0514bd4de8ac25adae60423)

## rxDispatch variable

Binds the dispatch method

<b>Signature:</b>

```typescript
rxDispatch: <S>(aStore: Store<S>) => Consumer<AnyAction>
```

<a name="_f080fb6d21d915e076ad16c4eb10b42cdc5f60d21983b00ddb34d5093c4bf897"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [rxSelect](#_f080fb6d21d915e076ad16c4eb10b42cdc5f60d21983b00ddb34d5093c4bf897)

## rxSelect variable

Exposes a memoized selector function

<b>Signature:</b>

```typescript
rxSelect: <T, R>(aSelector: UnaryFunction<T, R>, aCmp?: EqualsPredicate<R>) => OperatorFunction<T, R>
```

<a name="_8c881d33af7999eefd88a320c2f7659b46e80248876aa4be6c9354db696232c3"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [selectFeature](#_8c881d33af7999eefd88a320c2f7659b46e80248876aa4be6c9354db696232c3)

## selectFeature variable

Returns a selector that selects the given feature

<b>Signature:</b>

```typescript
selectFeature: <S, FS = any>(idOrModuleId: string | ReduxFeatureModuleId<S, FS>, aDefaultState?: S) => UnaryFunction<ReduxRootState, S>
```

<a name="_938bfa184eebde4d5de9ec2479e82379ad25a5405996b6592769df9190bb32a2"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [STORE\_ID](#_938bfa184eebde4d5de9ec2479e82379ad25a5405996b6592769df9190bb32a2)

## STORE\_ID variable

Exposes the namespace of this store. This constant can e.g. be used to prefix actions.

<b>Signature:</b>

```typescript
STORE_ID = "@acoustic-content-sdk/redux-store"
```

<a name="_671d116557d9764b8b342ef441e4088063d7517284c0b07649f83285cd4b6757"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [VERSION](#_671d116557d9764b8b342ef441e4088063d7517284c0b07649f83285cd4b6757)

## VERSION variable

Version and build number of the package

<b>Signature:</b>

```typescript
VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}
```

<a name="_97d493d60fcbe130b9869a39e7b72a09836d488debcc8a1e6c6829862e81ddbc"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxRootState](#_97d493d60fcbe130b9869a39e7b72a09836d488debcc8a1e6c6829862e81ddbc)

## ReduxRootState type

Root state for the reducer, this is a mapping from feature ID to feature.

<b>Signature:</b>

```typescript
export declare type ReduxRootState = Record<string, any>;
```

<a name="_a6af75b7504a0a00d017a0b16aa754cbeab0e22cddecae71683ff892ab6148d8"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxRootStore](#_6aeba4bbbe96bcaa0ca644e1f854a0a66aacd39e07855331aca46a194a09b60f) &gt; [addFeatureModule](#_a6af75b7504a0a00d017a0b16aa754cbeab0e22cddecae71683ff892ab6148d8)

## ReduxRootStore.addFeatureModule() method

Registers a feature module with the root store

<b>Signature:</b>

```typescript
addFeatureModule<RFS = any, FS = any>(aFeature: ReduxFeatureModule<RFS, FS>): ReduxRootStore<FS, A>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  aFeature | <code>ReduxFeatureModule&lt;RFS, FS&gt;</code> | the feature model |

<b>Returns:</b>

`ReduxRootStore<FS, A>`


<a name="_5e60697365d38c2e7e4880c2d2d82fb5361bf7e7a50d91bd023646d810ca04b2"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [PayloadAction](#_1e65cd38089e5b953fa42c6fd70761d88562bada790f6ecdbfb179c297b431e4) &gt; [payload](#_5e60697365d38c2e7e4880c2d2d82fb5361bf7e7a50d91bd023646d810ca04b2)

## PayloadAction.payload property

<b>Signature:</b>

```typescript
[ACTION_PAYLOAD]: T;
```

<a name="_ee1b7128b9a49b077bdf32e67dceb833021b5d9b74530393b5690a81358590b3"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxFeatureModuleId](#_056eef027d0da2be8587371334e3c7def8b7e888d5ac5ccb0cf604ba4afe2d56) &gt; [id](#_ee1b7128b9a49b077bdf32e67dceb833021b5d9b74530393b5690a81358590b3)

## ReduxFeatureModuleId.id property

ID of the feature module, will also be used as the key to the state

<b>Signature:</b>

```typescript
id: string;
```

<a name="_3516fec258a78cb5676f5ba9bec45972f963910d90eb0f28de6164f1a92367e8"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxFeatureModule](#_a3e535780ec6785ecd4e6c17b644cd4b35d693fa0c91948d0de138bae3abc8ef) &gt; [dependencies](#_3516fec258a78cb5676f5ba9bec45972f963910d90eb0f28de6164f1a92367e8)

## ReduxFeatureModule.dependencies property

Dependencies on other modules

<b>Signature:</b>

```typescript
dependencies?: ArrayLike<ReduxFeatureModule<any>>;
```

<a name="_deb7a93db1cd5a6c70f7f0091d40092ca90229b4412d418d5da3f8cbd0886e43"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxFeatureModule](#_a3e535780ec6785ecd4e6c17b644cd4b35d693fa0c91948d0de138bae3abc8ef) &gt; [epic](#_deb7a93db1cd5a6c70f7f0091d40092ca90229b4412d418d5da3f8cbd0886e43)

## ReduxFeatureModule.epic property

The epic for side effects

<b>Signature:</b>

```typescript
epic?: Epic<Input, Output, ReduxRootState, Dependencies>;
```

<a name="_2cc604915409469dcf5a79725b6338eaa5aa15a44374e42d9d909d5050afc529"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxFeatureModule](#_a3e535780ec6785ecd4e6c17b644cd4b35d693fa0c91948d0de138bae3abc8ef) &gt; [id](#_2cc604915409469dcf5a79725b6338eaa5aa15a44374e42d9d909d5050afc529)

## ReduxFeatureModule.id property

ID of the feature module, will also be used as the key to the state

<b>Signature:</b>

```typescript
id: string;
```

<a name="_ba04dcd50701dc6bcf9547735c6ad17f7fd3bbdf7de9c73eb8ceb2bb70378c03"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxFeatureModule](#_a3e535780ec6785ecd4e6c17b644cd4b35d693fa0c91948d0de138bae3abc8ef) &gt; [reducer](#_ba04dcd50701dc6bcf9547735c6ad17f7fd3bbdf7de9c73eb8ceb2bb70378c03)

## ReduxFeatureModule.reducer property

The reducer for the module.

<b>Signature:</b>

```typescript
reducer?: Reducer<S>;
```

<a name="_a9e1ee10862fe82d439a32e7f66d6442d140e16b73d3c4b02698c917771d8907"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxRootStoreDependencies](#_564fe347012524fb390d10b1a134baf940fc65a1617da8ecbc2676312561ef54) &gt; [logSvc](#_a9e1ee10862fe82d439a32e7f66d6442d140e16b73d3c4b02698c917771d8907)

## ReduxRootStoreDependencies.logSvc property

Service that allows to create logger instances

<b>Signature:</b>

```typescript
logSvc: LoggerService;
```

<a name="_3769e3fb6c382a3b7a4805df0bad7bc49f70dd3a5768edfe59afa3c1af893724"></a>
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](#_8a3d8aa5b86a339a2b4072f50055f51d1079af57a58981c0edb6e190047ed935) &gt; [@acoustic-content-sdk/redux-store](#_1a6aba8faddcb4bdb698dc09f54be7275ffcd7535bc5a7d30c8729542d0a005d) &gt; [ReduxRootStoreDependencies](#_564fe347012524fb390d10b1a134baf940fc65a1617da8ecbc2676312561ef54) &gt; [rootStore](#_3769e3fb6c382a3b7a4805df0bad7bc49f70dd3a5768edfe59afa3c1af893724)

## ReduxRootStoreDependencies.rootStore property

The root store dependencies

<b>Signature:</b>

```typescript
rootStore: ReduxRootStore;
```

---
_Source: https://npm.io/package/@acoustic-content-sdk/redux-store · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
