Setup

MiniRx Store requires only a minimum of configuration to get started.

No Setup#

The most basic setup is no setup... we can pass an empty configuration to configureStore and get hold of the Store instance.

import { configureStore, Store } from 'mini-rx-store';
const store: Store = configureStore({});

With the store instance we can already add reducers (dynamically), select state, dispatch actions and create effects.

Redux Setup#

Read "Redux" Store Setup to see the Redux related configuration options.

Extensions#

We can add extensions to the Store config to add additional functionality.

Currently, these extensions are included in MiniRx:

  • Redux Dev Tools Extension: Inspect state with the Redux Dev Tools
  • Immutable Extension: Enforce state immutability
  • Undo Extension: Undo dispatched actions
  • Logger Extension: console.log the current action and updated state

Example: Add the LoggerExtension

import { LoggerExtension } from 'mini-rx-store';
const store: Store = configureStore({
extensions: [new LoggerExtension()]
});